useIsomorphicLayoutEffect
`useLayoutEffect` that does not throw warnings in SSR.
Usage Example
1import { useIsomorphicLayoutEffect } from '@danixsoft/hooks';
2
3function Example() {
4 // Acts as useLayoutEffect on client, and useEffect on server
5 useIsomorphicLayoutEffect(() => {
6 console.log('Layout effect executed');
7 }, []);
8
9 return <div>Check console</div>;
10}