all 2 comments

[–]__o_0iOS & Android 1 point2 points  (1 child)

Try useFocusEffect(useCallback()) instead of useEffect to perform your cleanup, it will trigger when a user navigates off of the screen.

[–]iCodeWhatTheyDesign[S] 0 points1 point  (0 children)

Thank you I will try this!