React-native - Passing data from one screen to another

前端 未结 3 1350
灰色年华
灰色年华 2020-12-31 14:57

I am trying to learn how to use react-native, so I am putting up a small app that fetch a list of users from a server, displays it in a listview and where press

3条回答
  •  旧时难觅i
    2020-12-31 16:00

    Replace code :

     this._handlePress()}
          style={styles.button}
    >
    

    With :

     this._handlePress()}
          style={styles.button}
         navigator={navigator} {...route.props}
    >
    

    This is fine:

    this.props.navigator.push({
    component: ContactDetails,
       props: {
        title: rowData.name.title,
        first: rowData.name.first,
        last: rowData.name.last,
      }
    });
    

提交回复
热议问题