标签: reactjs react-router next.js
最近要迁移到nextjs,并且必须移植从react-router到next-router的所有内容。 我找不到的一个文档是如何获取previousPathName并重定向到该页面。
基本上是下一个路由器的对应版本:
let { previousPathName } = this.state; this.props.history.push(previousPathName);