React should be a peer dependenciesSee original GitHub issue
One think I noticed working on the AtlasMap POC is that I was getting the Invalid Hook Call Warning
error in the console. Ultimately, it was due to
@kogito/core-api declaring React as direct dependency, which causes for multiple versions of React being embedded in the bundle. Since AtlasMap is written solely using hooks, this issue come up immediately.
A quick workaround was to instruct WebPack to consider React an external dependency, but it would be better to make React and React DOM peer dependencies in the
- Created 3 years ago
Top GitHub Comments
I mean, your project your rules 😄
Let’s say that this would be quite an exception in the npm ecosystem and would limit peers to use the provided template and tools (what if I don’t want to use webpack? Sure things like rollup allow for declaring external global dependencies, but I don’t see why adding this cognitive burden to users).