Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/usehooks-ts.ts>useUpdateEffect

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function useUpdateEffect
Deprecated
Deprecated
  • Don't use this hook, it's an anti-pattern. Custom hook that runs an effect only on updates (not on the initial render).
import { useUpdateEffect } from "https://deno.land/x/netzo@0.4.72/deps/usehooks-ts.ts";

Examples

// Usage of useUpdateEffect hook useUpdateEffect(() => { // Effect code to run on updates console.log('Component updated!'); }, [dependency1, dependency2]);

Parameters

effect: EffectCallback
  • The function to run as the effect.
optional
deps: DependencyList
  • An optional array of dependencies for the effect.