UNPKG

553 BTypeScriptView Raw
1/**
2 * useIsAfterInitialMount will trigger a re-render to provide
3 * you with an updated value. Using this you enhance server-side
4 * code that can only run on the client.
5 * @returns MutableRefObject<T> - Returns a ref object with the
6 * results from invoking initial value
7 * @example
8 * function ComponentExample({children}) {
9 * const isMounted = useIsAfterInitialMount();
10 * const content = isMounted ? children : null;
11 *
12 * return <React.Fragment>{content}</React.Fragment>;
13 * }
14 */
15export declare function useIsAfterInitialMount(): boolean;