Zustand Persist Middleware Migration: Can Rollback Safely After Schema Version Change?
Zustand's persist middleware rehydrates the store from persisted JSON and optionally runs a migrate function that converts outdated state shape to the current TypeScript type, using a version option supplied in the persist configuration. The migration runs only during initial load, not on subsequent state updates, and Zustand does not automatically roll back