You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the flow as this: user opens the webapp, data gets fetched on server side, then data is send to context, on client side the data is set into the zustand state as part of the context provider component.
But when I use zustand state in this case I use it with createStore. So how can I use subscribeWithSelector or use selectors in the subscribe function?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a webapp where I am fetching data on server side and then using this guide: https://docs.pmnd.rs/zustand/guides/nextjs
I have the flow as this: user opens the webapp, data gets fetched on server side, then data is send to context, on client side the data is set into the zustand state as part of the context provider component.
But when I use zustand state in this case I use it with
createStore
. So how can I usesubscribeWithSelector
or useselector
s in the subscribe function?Beta Was this translation helpful? Give feedback.
All reactions