Reactjs 从历史中获取状态
如何从重定向路由中的history.push()访问状态 比如说,Reactjs 从历史中获取状态,reactjs,Reactjs,如何从重定向路由中的history.push()访问状态 比如说, history.push({ pathname: '/order', state: {orderId} }) 当你想导航时,你可以按以下格式传递道具 this.props.history.push({ pathname: '/order', state: {orderId: response.data } }) 你能解释一下你到底想要什么吗?
history.push({ pathname: '/order', state: {orderId} })
当你想导航时,你可以按以下格式传递道具
this.props.history.push({
pathname: '/order',
state: {orderId: response.data }
})
你能解释一下你到底想要什么吗?