Pass Accessoires StackNavigator

j'essaie de transmettre des accessoires sur stacknavigator, voici mon code

JS:

const MainCart = StackNavigator({
  Cart: {
    screen: CartScreen
  },
  Checkout: {
    screen: COScreen
  }

  /* how to pass 'myprops' in this area? */

});


export default class ReactNative_RefreshControl extends Component {

  constructor(props) {
    super(props)
  }

  render() {
    console.log('ReactNative_RefreshControl this.props.myparam : ' + this.props.myparam);
    return <MainCart myprops = {
      this.props.myparam
    }
    />;

    //https://reactnavigation.org/docs/navigators/stack#Navigator-Props
  }


}

comment passer "myprops" sur StackNavigator région?

grâce

InformationsquelleAutor Ansyori | 2017-10-31