Versioned localStorage persistence for one grid's layout.
Writes go through a ref, so saving never causes a re-render. Every read and
write is wrapped: a quota error or a privacy mode degrades to not persisting
rather than throwing, and state saved under a different
GRID_STATE_VERSION is discarded rather than migrated.
Parameters
storageKey: string|undefined
Key to store under, namespaced as hxg:<storageKey>.
Pass undefined to disable persistence entirely.
Versioned
localStoragepersistence for one grid's layout.Writes go through a ref, so saving never causes a re-render. Every read and write is wrapped: a quota error or a privacy mode degrades to not persisting rather than throwing, and state saved under a different GRID_STATE_VERSION is discarded rather than migrated.