There was an error while loading. Please reload this page.
1 parent 1689b77 commit 6c9f8deCopy full SHA for 6c9f8de
contents/react/diffValues.md
@@ -19,7 +19,7 @@ function usePrevious(value) {
19
const ref = useRef();
20
useEffect(() => {
21
ref.current = value;
22
- });
+ }, [value]);
23
return ref.current;
24
}
25
```
0 commit comments