-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Add a debug check to <Provider>
to throw a more detailed error when used in Next
#2082
Comments
Still worth doing something for v8, especially since it doesn't have the |
Totally up to you 😊 |
How about adding |
@ryota-murakami the props Provider needs (store, context) aren't serializeable, so it would still need to be called from a client component as far as i know |
@EskiMojo14 I think that's right too. I just felt that if I had explicitly stated Client Compoment, Next would have given a friendly error message. |
@ryota-murakami no worries - my suspicion is that with the "use client" pragma added, it would throw an error message relating to store.dispatch not being serializeable instead of hooks not existing neither is ideal which is why it'd be good to have an explicit check so we can control the error message |
I wonder if we could somehow do a debug check inside of
<Provider>
, check for the existence ofuseIsomorphicLayoutEffect
, and throw a more informative error if it doesn't exist?I know we added the
"react-server"
condition in v9 beta - not sure how these play togetherThe text was updated successfully, but these errors were encountered: