Skip to content
public-library›Rules›Zustand›Persist only safe, versioned state

Persist only safe, versioned state

Persist only the fields that must survive a reload, under a unique storage key, with a version and migration for shapes that may change. Never persist secrets or credentials.

In the full rule