useUpdateEffect
A hook to run an effect only when the component updates
Installation
npx shadcn@latest add @shadcnhooks/use-update-effectAPI
/**
* A hook to run an effect only when the component updates
* @param effect - The effect to run
* @param deps - The dependencies to run the effect on
*/
export function useUpdateEffect(
effect: EffectCallback,
deps: DependencyList,
): voidCredits
Last updated on