Dynamic parameter on routes
Hello! I have a question. Does anyone know how to manage this behavior with routes with solid start?
I'm looking to incorporate a dynamic parameter at the beginning of the URL, like this:
http://localhost:3000/{{dynamicParam}}/etc
Although this dynamic parameter doesn't serve any specific purpose, but it's essential for it to be included in the URL. Would anyone happen to know how I can achieve this?
The [slug] is dinamyc or can be modified ?
For example i have this
[locale]
--index.tsx
--otherroute.tsx
Sometimes i want the route to be
[en]
--index.tsx
--otherroute.tsx
Other times i want
[es]
--index.tsx
--otherroute.tsx
and SOMETIMES i dont want to have that param at all
--index.tsx
--otherroute.tsx
is that behaviour possible? Remember this parameter wont change functionallity, it will always display the same components1 Reply
I'm pretty sure the way you have it setup is how you want it to work no?
if you have
it translates to
/:locale/other
and /:locale
and locale is dynamic, it will catch any value as parameter that you can get with useParams
or not if you don't need to display anythin differently