Skip to content

Commit c2164d5

Browse files
authored
docs: changed useEffect example (#5711)
1 parent c1f6dc9 commit c2164d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

beta/src/content/learn/synchronizing-with-effects.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ If your Effect subscribes to something, the cleanup function should unsubscribe:
630630
```js {6}
631631
useEffect(() => {
632632
function handleScroll(e) {
633-
console.log(e.clientX, e.clientY);
633+
console.log(window.scrollX, window.scrollY);
634634
}
635635
window.addEventListener('scroll', handleScroll);
636636
return () => window.removeEventListener('scroll', handleScroll);

0 commit comments

Comments
 (0)