rooks
Version:
Essential React custom hooks ⚓ to super charge your components!
9 lines • 373 B
TypeScript
/**
* useSafeSetState
* @description set state but ignores if component has already unmounted
* @see {@link https://rooks.vercel.app/docs/useSafeSetState}
*/
import { SetStateAction, Dispatch } from "react";
declare function useSafeSetState<T>(initialState: T): [T, Dispatch<SetStateAction<T>>];
export { useSafeSetState };
//# sourceMappingURL=useSafeSetState.d.ts.map