Skip to content

About

404 error boundary for Dynamic routes or I'd rather say: Server-side-like fetching before entering a route.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

React-Dynamic-Routes-Manager

404 error boundary for Dynamic routes or I'd rather say: Server-side-like fetching before entering a route.

Explanation: https://abdoamin.medium.com/how-to-validate-dynamic-routes-in-react-router-8f399ace1d4e

The problem is that I did have dynamic pages with params like :id, :page...etc and if someone decided to manipulate the url and enter a random id, the app would show the page but of course it would be broken. So I decided to create a manager component to fetch the server and check if the id is valid. You can tweak this code to your own needs..

About

404 error boundary for Dynamic routes or I'd rather say: Server-side-like fetching before entering a route.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages