Function createSsStateProvider
createSsStateProvider<S extends unknown>( storageKey: string,): readonly [ ( __namedParameters: { children: ReactNode; initialState: S | () => S; onChange?: (state: S) => void; }, ) => Element, () => readonly [S, (state: S | (prevState: S) => S) => void],] Returns readonly [
(
__namedParameters: {
children: ReactNode;
initialState: S | () => S;
onChange?: (state: S) => void;
},
) => Element,
() => readonly [S, (state: S | (prevState: S) => S) => void],
]
- An array containing the WrappedStateProvider and useStateProvider components.
Creates a state provider for React components with support for persistent state storage.