Deprecated
- Don't use this hook, it'll be removed in the next major version. A hook that runs an effect only once (at mount).
import { useEffectOnce } from "https://deno.land/x/netzo@0.5.63/deps/usehooks-ts.ts";
Examples
useEffectOnce(() => {
console.log('Hello World');
});
useEffectOnce(() => { console.log('Hello World'); });
Parameters
effect: EffectCallback
- The effect to run.