useDeepCompareEffect
Usage is the same as useEffect, but deps are compared with react-fast-compare.
Overview
Usage is the same as useEffect, but deps are compared with react-fast-compare.
Installation
Open inpnpm dlx shadcn@latest add https://shadcn-ahooks.vercel.app/r/useDeepCompareEffect.jsonnpx shadcn@latest add https://shadcn-ahooks.vercel.app/r/useDeepCompareEffect.jsonyarn shadcn@latest add https://shadcn-ahooks.vercel.app/r/useDeepCompareEffect.jsonbun shadcn@latest add https://shadcn-ahooks.vercel.app/r/useDeepCompareEffect.jsonUsage is the same as useEffect, but deps are compared with react-fast-compare.
Examples
Default usage
API
useDeepCompareEffect(
effect: React.EffectCallback,
deps: React.DependencyList
);