DEV Community

Discussion on: Solving React Hooks' invalid hook call warning

Collapse
 
stephan281094 profile image
Stephan de Vries

Stumbled upon this as well and it sucks. I got it "fixed" by aliasing react to ./node_modules/my-cool-widget/node_modules/react 🤢. Really hoped there'd be a better solution instead of switching to Webpack. I guess Parcel simply isn't suitable for these kind of things.

Thanks for sharing!

Collapse
 
kendalmintcode profile image
Rob Kendal {{☕}}

Hey Stephan, I know, right! I was hoping to be able to use Parcel, and believe me I spent a lot of time trying different workarounds and even tried the recommendations on aliasing as recommended in Parcel's own documentation.

But it all came down to just switching over to Webpack :( (I don't have anything against Webpack, it's great, but a bit of overkill for what I needed!).

If anyone gets this thing solved using Parcel, then do share it, please! Prove me wrong Internet!