What is better in terms of handling user's role (Admin, Superadmin, User) restriction in Single Page Application (SPA) like React JS?
Option 1: All users will be redirected to a single route and hide the restricted component(s) based on their user's role.
Option 2: Each user will be redirected to a designated route based on their user's role.
Why your chosen option is better than another?
If you have any option(s) or suggestion(s) feel free to share.
Option 1: All users will be redirected to a single route and hide the restricted component(s) based on their user's role.
Option 2: Each user will be redirected to a designated route based on their user's role.
Why your chosen option is better than another?
If you have any option(s) or suggestion(s) feel free to share.
Last edited: