import { useEffect, useRef } from "react";
export function useIsFirstRendering() {
    const isFirstRender = useRef(true);
    useEffect((cb) => {
        if (cb && isFirstRender.current) {
            cb();
        }
        isFirstRender.current = false;
        // ---> StrictMode: The following is REQUIRED to reset/cleanup:
        return () => { isFirstRender.current = true; };
    }, []);
    return isFirstRender.current;
}
//# sourceMappingURL=useIsFistRendering.js.map