-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a 404 and 501 page example #4209
Comments
This is covered in the server rendering guide: https://github.com/ReactTraining/react-router/blob/master/docs/guides/ServerRendering.md (Sorry about the label/milestone noise above. Clicked things a little too fast there... 😄 ) |
Thank you for the quick answer! That helps but I think it does not address:
|
To do a redirect, you just have to call the provided |
How do you make it work when you have a route like |
One easy way is to do that in an onEnter hook. Just |
Can you have a |
Add a 404 and 501 example with best practices.
I saw there are a bunch of issues and PRs that were closed without a solution about 4xx errors. For example I found #3210, #3181, #3098, #3098 (closed because it cannot be merged?).
I am using Router v2.8.1 with isomorphic/universal rendering.
The example https://github.com/wdjungst/react-project/blob/master/create-react-project/blueprint/modules/routes.js covers only the basic use case of hitting a route that does not exist.
/user/:id
that asynchronously load the data that can result with a user that does not exist. In this case you want to send a404
and render a 404 page. Or maybe you want to have a specific 404 page for that route (user missing)./user/blocked
)The text was updated successfully, but these errors were encountered: