Skip to content

Zustand and Next - Persisting state between client components across page reloads #2897

Answered by dbritto-dev
Undistraction asked this question in Q&A
Discussion options

You must be logged in to vote

@Undistraction in a nutshell:

  • If you want to share store between pages you should place your store provider in the Root Layout
  • if you want to share store in one page you should place your store provider in the Layout of that page

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
3 replies
@Undistraction
Comment options

@dbritto-dev
Comment options

@andrejmoltok
Comment options

Answer selected by Undistraction
Comment options

You must be logged in to vote
4 replies
@andrejmoltok
Comment options

@Undistraction
Comment options

@Undistraction
Comment options

@andrejmoltok
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants