Replies: 1 comment 1 reply
-
https://reactnavigation.org/docs/drawer-navigator/#checking-if-the-drawer-is-open |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
V5 React Navigation
The only event I can listen for is focus and blur on the main screen when I leave and come back. This does NOT include opening and closing the drawer. When the drawer closes I need a function to be called every time.
Here is my working focus view. Is there code similar to this that I can use to trigger code when the drawer closes?
//call for new pings when screen focuses, returns from other views this.focusSubscription = this.props.navigation.addListener( 'focus', () => { console.log("Home screen focused"); this.get_pings_query(); } );
Beta Was this translation helpful? Give feedback.
All reactions