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

meteor - inserting data to database gives error "insert failed: Method '/texts/insert' not found" -

angular - DownloadURL return null in below code -