NextJs 14 + Zustand

60 views Asked by At

https://docs.pmnd.rs/zustand/guides/nextjs

This documentation explains how to use Zustand with NextJS.

I did not understand fully the document and the use of React Context was needed there.

Also for cases where I want to initialize my store with data I am fetching from the server, how would that look like? Would I populate the zustand store in a useEffect?

Problem is I can't find anyone who is using the same approach as the one documented.

0

There are 0 answers