@piplup/utilsHooks
useIsomorphicEffect
A cross-platform effect hook aliasing `useLayoutEffect` on the client.
import { useIsomorphicEffect } from "@piplup/utils";
function Component() {
useIsomorphicEffect(() => {
// runs like useLayoutEffect in client environments
}, []);
return null;
}Props
Prop
Type