Demo App
Medium Story Version-2
The idea is, simply prevent the app to generate unnecessary routes, rather checking current user role on each route it is great to generate only the routes that user have access.
- Check route access only once when parent route renders
- Generate only routes that user have access
- Central roles and private routes configuration file
- Easy to add/remove a role
- Easy to add/remove route access from user role
- Synchronization between routes and navigation
- Single + Multiple role support
- Design same approach for components