-
-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@nivo/sankey - React Hooks / React Router #726
Comments
Update: More debugging, and this is clearly related to using React Router v4. Apparently React Router is introducing a class based container somewhere along the render tree, which is throwing the Hook error. Does anybody have a code sample of using Nivo with React Router? |
@awatson1978, can you please reproduce this issue on codesandbox? I was able to use nivo in several contexts, and before moving to gatsby, the nivo website was using React router. I'm not sure it's an issue with nivo. |
Related, figured it might shine some light on the topic if you're using react-hot-loader. |
Hi. Did a proof-of-concept and everything worked; so the problem was somewhere in my codebase. Easiest thing to do is do a quick rewrite of the app. Thanks for the help. |
Describe/explain the bug
Hello. Receiving the following error regarding React Hooks.
Invariant Violation: Hooks can only be called inside the body of a function component.
To Reproduce
Just using the provided example from the documentation. Using it within a Meteor.js build pipeline for Node/Javascript, and with React 16.8.4.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: