Zustand 5.x
persist migrate
Converts stored state when the persisted version differs from the configured version.
Formal Syntax & Structure
react syntaxreact
{version:1,migrate:(raw,version)=>migratePrefs(raw,version)}Working Example
Example Snippetreact
{version:1,migrate:(raw,version)=>migratePrefs(raw,version)}