-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Uncaught Error: Invalid hook call. #3164
Comments
Note: This error occurs because I have a library which contains all of my components. My structure is something like this:
Then when I do: import { MySlateComponent } from '@my-corp/library-of-components' I get these hook errors, I do not get these errors when I move the file into my main project. |
The above error seems to have been caused because I was using |
Fixed by adding: ...
resolve: {
alias: {
react: require.resolve('react')
}
}
... To my projects webpack configuration. |
@tavurth Thank you this led me to figuring out my problem. |
Do you want to request a feature or report a bug?
Bug report
What's the current behavior?
I have a simple functional editor and it throws an error:
You can find an example in this gist.
What's the expected behavior?
Should not throw this error
The text was updated successfully, but these errors were encountered: