Shallow routing using withRouter and custom server not working
问题 Using withRouter as a wrapper with custom server, shallow routing doesn't seem to be working. I currently use this method to change the route: this.props.router.push({ pathname: currentPath, query: currentQuery, }); router prop comes from using withRouter to wrap my class component. And couldn't figure where to put the shallow flag. So I switched to the method mentioned in the docs: this.props.router.push('/post/[pid]?hello=123', '/post/abc?hello=123', { shallow: true }) So I did that