useResetStore
This hook allows to empty the Store. Ra-core uses it at logout.
Syntax
Section titled “Syntax”import { useResetStore } from 'ra-core';
const reset = useResetStore();reset();
Example
Section titled “Example”import { useResetStore } from 'ra-core';
const ResetButton = () => { const reset = useResetStore(); return ( <button onClick={() => reset()}> Reset store </button> );};