From 37cf98d075de3133b5ae69fe80fbecb6a742530a Mon Sep 17 00:00:00 2001 From: dan Date: Sat, 20 Aug 2022 02:48:37 +0100 Subject: [PATCH] Update separating-events-from-effects.md --- beta/src/pages/learn/separating-events-from-effects.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/beta/src/pages/learn/separating-events-from-effects.md b/beta/src/pages/learn/separating-events-from-effects.md index 06aa3711..a3bf5fd5 100644 --- a/beta/src/pages/learn/separating-events-from-effects.md +++ b/beta/src/pages/learn/separating-events-from-effects.md @@ -661,8 +661,8 @@ function Page({ url }) { const { items } = useContext(ShoppingCartContext); const numberOfItems = items.length; - const onVisit = useEvent((visitedUrl) => { - logVisit(url, numberOfItems); + const onVisit = useEvent(visitedUrl => { + logVisit(visitedUrl, numberOfItems); }); useEffect(() => { @@ -757,4 +757,4 @@ It's possible that in the future, some of these restrictions will be lifted. But - Only call Event functions from inside Effects - Don't pass Event functions to other components or Hooks - \ No newline at end of file +