@damenor/use-isomorphic-layout-effect
v1.1.0
Published
### Use
Downloads
3
Readme
Hook - useIsomorphicLayoutEffect
Use
import { useIsomorphicLayoutEffect } from '@damenor/use-isomorphic-layout-effect'
export default function Component() {
useIsomorphicLayoutEffect(() => console.log("In the browser, I'm an `useLayoutEffect`, but in SSR, I'm an `useEffect`."), [])
return <h2>Hello World!</h2>
}