Skip to content

Commit c7df9c1

Browse files
committed
Shorten onScroll effect
1 parent eef9762 commit c7df9c1

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/components/ReviewList.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ export default ({ orderBy }) => {
3131

3232
useEffect(() => {
3333
window.addEventListener('scroll', onScroll)
34-
return () => {
35-
window.removeEventListener('scroll', onScroll)
36-
}
34+
return () => window.removeEventListener('scroll', onScroll)
3735
}, [onScroll])
3836

3937
return (

0 commit comments

Comments
 (0)