- useStore(): {
clearOnChange: <T>(callback: (piece: T) => void) => void;
getInitialState: () => Partial<State>;
getState: () => State;
onChange: <T>(
selector: (state: State) => T,
callback: (piece: T) => void,
) => void;
updateState: (newState: Partial<State>) => void;
} Returns {
clearOnChange: <T>(callback: (piece: T) => void) => void;
getInitialState: () => Partial<State>;
getState: () => State;
onChange: <T>(
selector: (state: State) => T,
callback: (piece: T) => void,
) => void;
updateState: (newState: Partial<State>) => void;
}
Use the store context