Next.js + react-router
- Install Next.js as usual
- Configure custom
server.jsto redirect any request to same single entrypoint - Declare a
with-react-routerHOC to wrap the app withreact-routerbrowser or static router - Wrap the app with
with-react-routerHOC on page initialization with a custom./pages/_app.jscomponent react-routeris now able to universal render replacing native Next.js routing system