Returns readonly [((options: {
children: ReactNode;
initialState: S | (() => S);
onChange?: ((state: S) => void);
}) => Element), (() => readonly [S, ((state: S | ((prevState: S) => S)) => void)])]
A tuple containing the wrapped state provider
component and the state hook.
Creates a state provider that persists state in local storage using a given storage key.