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
Post a Comment