/** * Like React's [useState](https://reactjs.org/docs/hooks-reference.html#usestate) * but it makes sure the component that uses this state hook is mounted before updating state * @param {D} initialValue * @returns {[D, Dispatch]} an array of 2 items * the first is the current state, the second is a function that enables * updating the state if the component is not mounted * * D is the type passed when then useMountedState is used * e.g. const [pass, setPass] = useMountedState('someString'); */ export declare const useMountedState: (initialState: D | (() => D)) => readonly [D, (value: D) => void];