import { ReactRef, StateHolder } from "./react-core-utils"; /** * Similar to [useState](https://reactjs.org/docs/hooks-reference.html#usestate) with some changes: * 1. Ensures that enclosing function component is mounted in order to update state. * 2. Returns an object instead of an array. * * @see https://reactjs.org/docs/hooks-reference.html#usestate * @param initialValue Make this the initial value for state. * @returns An object containing 2 items: the state, and a function that enables updating the * state if the component is not mounted. */ export declare const useStateSafely: (initialValue: T) => StateHolder; /** * Runs an effect just once (onComponentDidMount) which sets the ref (that's returned) to true when * the component is mounted. And false when it isn't (hasn't been mounted yet, or has been * unmounted). */ export declare const useIsComponentMounted: () => ReactRef;