Skip to content

Commit

Permalink
refactor(createEffectWithTarget): the first parameter is old-deps (al…
Browse files Browse the repository at this point in the history
  • Loading branch information
coding-ice authored and raotaohub committed Mar 28, 2024
1 parent 9db994f commit 85eaf13
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/hooks/src/utils/createEffectWithTarget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ const createEffectWithTarget = (useEffectType: typeof useEffect | typeof useLayo

if (
els.length !== lastElementRef.current.length ||
!depsAreSame(els, lastElementRef.current) ||
!depsAreSame(deps, lastDepsRef.current)
!depsAreSame(lastElementRef.current, els) ||
!depsAreSame(lastDepsRef.current, deps)
) {
unLoadRef.current?.();

Expand Down

0 comments on commit 85eaf13

Please sign in to comment.