Declares a persisted value stored through the registered persistence layer, to share between components (usePersistedState(state)) and plain functions (state.get(), state.set(…)). Declare it at module scope.
usePersistedState(state)
state.get()
state.set(…)
Where the value lives, and its initial value. Without attr, it stays in memory.
attr
Declares a persisted value stored through the registered persistence layer, to share between components (
usePersistedState(state)) and plain functions (state.get(),state.set(…)). Declare it at module scope.