From c2164d51318925363ce3f72b2013344779d84ba3 Mon Sep 17 00:00:00 2001 From: Siva Addanki <34810623+avsssai@users.noreply.github.com> Date: Sat, 18 Mar 2023 04:56:26 +0530 Subject: [PATCH] docs: changed useEffect example (#5711) --- beta/src/content/learn/synchronizing-with-effects.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beta/src/content/learn/synchronizing-with-effects.md b/beta/src/content/learn/synchronizing-with-effects.md index 11ca244a..8a11aed9 100644 --- a/beta/src/content/learn/synchronizing-with-effects.md +++ b/beta/src/content/learn/synchronizing-with-effects.md @@ -630,7 +630,7 @@ If your Effect subscribes to something, the cleanup function should unsubscribe: ```js {6} useEffect(() => { function handleScroll(e) { - console.log(e.clientX, e.clientY); + console.log(window.scrollX, window.scrollY); } window.addEventListener('scroll', handleScroll); return () => window.removeEventListener('scroll', handleScroll);