shadcn-ahooks

createUpdateEffect

The API createUpdateEffect

Overview

  • createUpdateEffect is a React hook that works similarly to useEffect but performs a deep comparison of its dependencies. This means that the effect will only re-run if the actual content of the dependencies changes, rather than just their references.

## Installation

Open in
pnpm dlx shadcn@latest add https://shadcn-ahooks.vercel.app/r/createUpdateEffect.json
npx shadcn@latest add https://shadcn-ahooks.vercel.app/r/createUpdateEffect.json
yarn shadcn@latest add https://shadcn-ahooks.vercel.app/r/createUpdateEffect.json
bun shadcn@latest add https://shadcn-ahooks.vercel.app/r/createUpdateEffect.json

Usage

API

On this page