Add support for route guards #155
mammadataei
started this conversation in
Ideas
Replies: 2 comments
-
I'd love to have that too! But I think it would be even nicer to have a implementation like angular guards! Its really easy to make guards there. You just return a boolean and were to navigate if false! Right now I just wrap my element in the router with a function that decides if the user is allowed to go to the specific route |
Beta Was this translation helpful? Give feedback.
0 replies
-
Import Navigate from react-location, then use a ternary like this.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I think it will be handy to support per-route and global route guards, something like how
vue-router
or nuxt middlewares work.Navigation Guards - Vue Router
Nuxt Middlewares
Beta Was this translation helpful? Give feedback.
All reactions