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

string - Using python and postgres, variables within execute function? -

python - Creating a new column in a dataframe based on the result of the addition of three others -