shubhnik / redux-react-navigation-demos

React-Native + Redux + Redux-Persist + React Navigation ( Authentication Flow with Redux demos)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to pass the parameters , between components ?

isurugajasinghe opened this issue · comments

navigate = () => {
const navigateToScreen2 = NavigationActions.navigate({
routeName:'screen2',
params:{name:'Shubhnik'}
})
// navigateToscreen2 will look like this:
/*
{
"type": "Navigation/NAVIGATE",
"routeName": "screen2",
"params":{
"name":"Shubhnik"
}
}
*/

  // The navigateToScreen2 action is dispatched and new navigation state will be calculated in basicNavigationReducer here ---> https://gist.github.com/shubhnik/b55602633aaeb5919f6f3c15552d1802
  this.props.navigation.dispatch(navigateToScreen2)

}

this method not working