Without using Redux, how do I detect a tab change with a react navigation tab navigator?
I know I need to somehow use onNavigationStateChange but I can't figure out how to update the current view.
export default () => <MyTabNav
ref={(ref) => { this.nav = ref; }}
onNavigationStateChange={(prevState, currentState) => {
//call function on current view
}}
/>;