Zustand persist + immer middleware hydration issues
Unanswered
Soft-Coated Wheaten Terrier posted this in #help-forum
Soft-Coated Wheaten TerrierOP
Hey everyone! I’m implementing a Zustand store using both persist and immer middlewares in a Next.js project, following the official guide https://zustand.docs.pmnd.rs/reference/integrations/persisting-store-data#usage-in-next.js.
Despite using "use client" on all components consuming the store, I’m consistently getting a hydration error. It seems like the persisted state from storage is clashing with the initial server render.
I’ve unfortunately lost my component-level code, but does anyone has any idea?
Thanks
Despite using "use client" on all components consuming the store, I’m consistently getting a hydration error. It seems like the persisted state from storage is clashing with the initial server render.
I’ve unfortunately lost my component-level code, but does anyone has any idea?
Thanks