URL structure is determined in the backend. can It be handled with react-router-7 properly? #12526
-
Handling Dynamic URL Rewrites in FrontendCurrent SetupOur site implements a custom URL rewrite system. For example, a route like
What's the recommended architectural approach for handling dynamic URL rewrites in react-router framework mode? Thank you |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can use a catch-all/splat route and inside the route loader fetch the API to know how to handle that route. Although at that point you're not using RR anymore, you're just using the API as your router, unless you other routes not handle by the API like |
Beta Was this translation helpful? Give feedback.
You can use a catch-all/splat route and inside the route loader fetch the API to know how to handle that route.
Although at that point you're not using RR anymore, you're just using the API as your router, unless you other routes not handle by the API like
/
,/login
, etc. in that case it can make sense to use RR to define those routes and a catch-all/splat for the rest.