shadcn-ahooks

createDeepCompareEffect

The API createDeepCompareEffect

Overview

  • createDeepCompareEffect 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/createDeepCompareEffect.json
npx shadcn@latest add https://shadcn-ahooks.vercel.app/r/createDeepCompareEffect.json
yarn shadcn@latest add https://shadcn-ahooks.vercel.app/r/createDeepCompareEffect.json
bun shadcn@latest add https://shadcn-ahooks.vercel.app/r/createDeepCompareEffect.json

Usage

API

On this page