React router, pass data when navigating programmatically?

前端 未结 6 1256
广开言路
广开言路 2020-12-07 12:06

We could navigate to different path using

this.props.router.push(\'/some/path\')

Is there a way to send params (object) along when navigating?

6条回答
  •  庸人自扰
    2020-12-07 13:01

    if you want to send it in query string

    this.props.router.push({
      pathname: '/payment-history',
      query: {
        email: rowData.email
      }
    })
    

提交回复
热议问题