import * as React from "react";
const useSSRLayoutEffect = typeof window !== "undefined" ? React.useLayoutEffect : React.useEffect;
const useDidUpdateSSRLayoutEffect = (effect, deps) => {
  const isFirstRender = React.useRef(true);
  React.useEffect(() => {
    isFirstRender.current = false;
  }, []);
  return useSSRLayoutEffect(() => {
    if (!isFirstRender.current) {
      return effect();
    }
    return void 0;
  }, deps);
};
export {
  useDidUpdateSSRLayoutEffect,
  useSSRLayoutEffect
};
//# sourceMappingURL=useSSRLayoutEffect.js.map
