use-isomorphic-effect

useLayoutEffect that does not show warning when used in SSR

Import

Usage

use-isomorphic-effect is a replacement for useEffect hook that works in both browser and server environments.

import { useIsomorphicEffect } from '@mantine/hooks';

function Demo() {
  useIsomorphicEffect(() => {
    document.title = 'title';
  });

  return null;
}