dan
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
3 deletions
-
beta/src/pages/learn/separating-events-from-effects.md
|
@ -661,8 +661,8 @@ function Page({ url }) { |
|
|
const { items } = useContext(ShoppingCartContext); |
|
|
const { items } = useContext(ShoppingCartContext); |
|
|
const numberOfItems = items.length; |
|
|
const numberOfItems = items.length; |
|
|
|
|
|
|
|
|
const onVisit = useEvent((visitedUrl) => { |
|
|
const onVisit = useEvent(visitedUrl => { |
|
|
logVisit(url, numberOfItems); |
|
|
logVisit(visitedUrl, numberOfItems); |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
useEffect(() => { |
|
|
useEffect(() => { |
|
|