Zustand Persist Middleware: Managing State Migrations via the Version Property
When updating the state schema in a Zustand store using the persist middleware, the version property is used to track the current schema iteration. This allows the migrate function to transform persisted data from an older version to the current one during the hydration process. A design uncertainty arises when handling incremental updates across multiple ve