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

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -