next js push router code example
Example 1: next router push state
Router.push({
pathname: '/about',
query: { name: 'Someone' }
})
Example 2: next router push state
import { withRouter } from 'next/router'
class About extends React.Component {
// your Component implementation
// retrieve them like this
// this.props.router.query.name
}
export default withRouter(About)