📜  将对象传递给 Router.push NextJs 上的查询 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:59.110000             🧑  作者: Mango

代码示例1
import Router, { withRouter } from 'next/router'

performSearch = (event) => {
    event.preventDefault();
    Router.push({ pathname: '/results', state: { pattern: this.state.searchText } });
};