Skip to content

Detected multiple Jotai instances. It may cause unexpected behavior with the default store. #2072

Discussion options

You must be logged in to vote

That's exactly the case the warning is trying to detect.
Using getDefaultStore() assumes single Jotai instance.

If you are using Nextjs, it's recommended to avoid using the default store.

-   return <Provider store={store}>{children}</Provider>;
+   return <Provider>{children}</Provider>;

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@fabio-nettis
Comment options

Answer selected by fabio-nettis
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants