React Routing
See original GitHub issueI usually like to do my research and spend a lot of time doing so before reaching out for help but I’m at a dead end. I must be having tunnel vision at this point but either way here goes.
I understand the reason for handling routes in Nest and routing them to Next but I’m actually looking for Next to handle anything not defined in Nest. I don’t know if this is the correct use case but here’s an example none the less.
In pages/, I create a file called index.tsx and in nest I add to the AppController a Get(‘’) and Render(‘Index’). This loads on localhost:3000. In this index.tsx file, I create a link to redirect the user to a new page called Profile (<Link>). Clicking on this link for Profile, it successfully routes the user however when I refresh, Nest kicks in and throws an error.
Is there a solution for this?
In conclusion, if I go to /asadd
, a non existent route in Nest, I would like to see the Next 404 error page and not the Nest stack trace page.
Issue Analytics
- State:
- Created 4 years ago
- Comments:29 (12 by maintainers)
Top GitHub Comments
@kyle-mccarthy No sorry I was on another subject. I’ll try it this week and let you know. Thanks again for your patience.
Any chance you can provide an example project for this ?