DickyT / react-native-tabbar-navigator

(aka React Native Tanner Navigator) A component which builds excellent Navigator + TabBar based application, have a good solution for implementing hidesBottomBarWhenPushed in iOS.
97 stars 29 forks source link

regarding passProps at this.props.navigator.push #12

Closed YanzhuVAS closed 8 years ago

YanzhuVAS commented 8 years ago

Hi Dicky,

I had one problem when switch the TabBarIOS to your TabBarNavigator, passProps seems not working , the component pushed not able to get the props . I checked your source code, seems you used the navigator as the base class, the this article said it is not suppored to pass props to next component when push, could you provide a fix or any other suggestion in this case?

  this.props.navigator.push({
    title: 'Results',
    component: <CargoTableView/>,
    passProps: {listings: response.listings}
  });
YanzhuVAS commented 8 years ago

https://github.com/react-native-fellowship/react-native-navbar/issues/15 is the article referred.

YanzhuVAS commented 8 years ago
  this.props.navigator.push({
    title: 'Results',
    component: <CargoTableView listings={ response.listings}/>
  });

works for me

DickyT commented 8 years ago

Yes, you are right