use-isomorphic-effect

useLayoutEffect replacement

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;
}