useUpdateEffect
Lifecycle & refsA useEffect variant that skips the first render
Install
$ npm install @usefy/use-update-effectQuick start
useUpdateEffect.tsx
import { useUpdateEffect } from "@usefy/use-update-effect";
useUpdateEffect(() => {
// runs only when `query` changes, not on mount
search(query);
}, [query]);API reference
useUpdateEffect(effect, deps?) — same as useEffect but does not run on the initial render.
Go deeper
This page is the quick reference. For every example, prop, and edge case, read the full README — or open Storybook to change props live.