Skip to content

Commit 75c1658

Browse files
jasperckkentcdodds
andauthored
docs: improve documentation (#48)
Closes #47 Co-authored-by: Kent C. Dodds <[email protected]>
1 parent 8e82fb3 commit 75c1658

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ You use it in place of `React.useEffect`.
6969
> `useDeepCompareEffectNoCheck`, but do it at your own risk, as maybe there can
7070
> be better approaches to the problem.
7171
72+
> NOTE: Be careful when your dependency is an object which contains function.
73+
> If that function is defined on the object during a render, then it's changed
74+
> and the effect callback will be called every render.
75+
> [Issue](https://github.com/kentcdodds/use-deep-compare-effect/issues/47) has more context.
76+
7277
Example:
7378

7479
```jsx

0 commit comments

Comments
 (0)