Skip to content

Commit

Permalink
Avoid using useCallback in trackVerticalScrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
marcochavezf committed Mar 11, 2024
1 parent 1f6e9a5 commit 06c7fc5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pages/home/report/ReportActionsList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -323,12 +323,11 @@ function ReportActionsList({
}
};

const trackVerticalScrolling = useCallback((event: NativeSyntheticEvent<NativeScrollEvent>) => {
const trackVerticalScrolling = (event: NativeSyntheticEvent<NativeScrollEvent>) => {
scrollingVerticalOffset.current = event.nativeEvent.contentOffset.y;
handleUnreadFloatingButton();
onScroll?.(event);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
};

const scrollToBottomAndMarkReportAsRead = () => {
reportScrollManager.scrollToBottom();
Expand Down

0 comments on commit 06c7fc5

Please sign in to comment.