javascript - React native passing functions from main App.js file to screens in navigation using TabNavigator and StackNavigator -


in app.js file have function:

resettoken = () => {         try {             ...         } catch (error) {             ...         }     }; 

and navigation component:

<myrootnavigation resettoken={this.resettoken} /> 

and in myrootnavigation:

const simplestack = tabnavigator({         settings: {             screen: settingsscreen         },         notification: {             screen: notificationscreen         },         ... 

how settingsscreen know resettoken function?


Comments

Popular posts from this blog

python 2.7 - Given three nested dictionaries, sort the top two nested dictionaries from a value in the innermost dictionary? -

angular - DownloadURL return null in below code -