Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.62/deps/usehooks-ts.ts";

Examples

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

Parameters

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