shubhnik / redux-react-navigation-demos

React-Native + Redux + Redux-Persist + React Navigation ( Authentication Flow with Redux demos)
152 stars 55 forks source link

how to pass the parameters , between components ? #9

Open isurugajasinghe opened 6 years ago

isurugajasinghe commented 6 years ago

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