268f1872e4
* feat: add isomorphic hook * feat: use useIsomorphicLayoutEffect hook
4 lines
157 B
TypeScript
4 lines
157 B
TypeScript
import { useEffect, useLayoutEffect } from "react";
|
|
|
|
export const useIsomorphicLayoutEffect = typeof document !== "undefined" ? useLayoutEffect : useEffect;
|