useLayoutMount
It's similar to useMount
, except it uses useIsomorphicLayoutEffect
internally.
API
function useLayoutMount(effect: () => void): void;
Example
import React from "react";
import { useLayoutMount } from "@lilib/hooks";
function Example() {
useLayoutMount(() => {
console.log("Component is mounted");
});
...
}