useRemoveStateX()
Returns a function that will delete the value of the given state.
useRemoveStateX(atom)
function useRemoveStateX<T>(
atom: Atom<T>,
options?: StateXOptions<T>,
): [T, () => T];
useRemoveStateX(path)
function useRemoveStateX<T>(
path: Path,
defaultValue: T,
options?: StateXOptions<T>,
): [T, () => T];
Use
useStateXValueRemover()
to just remove the state without reading it's value.function useStateXValueRemover<T>(pathOrAtom: Path | Atom<T>,options?: Options,): () => T