New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
I changed the shape of my store, and now a returning visitor's saved localStorage data throws on load.
What you'll have at the end
A version number and migrate function that upgrades old saved state instead of crashing on it
You need
A Zustand store already wrapped in persist and saving to the browser, plus a planned change to one field's shape that would make an existing saved value stop matching your code.
Not covered
Choosing a different storage backend for persist, or reshaping more than one field in the same release. This recipe walks one field through one version bump; the same pattern scales to more.
Checked 22 Aug 2026
Part of the Frontend State Management Beyond Redux cookbook