Skip to Content
react-utilsuseIsomorphicEffect

useIsomorphicEffect

See source on Github

A utility hook that runs useLayoutEffect on the client and useEffect on the server. This is useful in applications that pre-render on the server and then rehydrate on the client; as running useLayoutEffect on the server will result in an error / warning.

See