K

use-isomorphic-effect

Switch between useEffect during SSR and useLayoutEffect after hydration
Import

Usage

Hook allows you to switch between useEffect during server side rendering and useLayoutEffect after hydration. Use it wherever you would use useLayoutEffect to avoid warnings during ssr:

import { useIsomorphicEffect } from '@mantine/hooks';
function Demo() {
useIsomorphicEffect(() => {
document.title = 'title';
});
return null;
}
Build fully functional accessible web applications with ease
Feedback
Your feedback is most valuable contribution to the project, please share how you use Mantine, what features are missing and what is done good
Leave feedback