Route Variables
URL and path related variables stored in RouterContext
Last updated
Was this helpful?
URL and path related variables stored in RouterContext
Last updated
Was this helpful?
In web applications, there is a very common practice to send parameters as URL variables and keywords to render or get different app behaviors or tracking for your applications.
This is an easy way to handle different use cases without adding extra complexity to your app or DB structure.
To use Route Variables you have to declare a Screen or Wrapper Route component in your app and declare some dynamic route variables in the URL of your component example:
For more information using screens see:
Add a Screen Component to your application
Add a dynamic property in the URL parameter using the next syntax:
Your new variable will be available for your component children to use and pass to other scripts or actions
Select and share the ID of a database entry in your app and pass it as a dynamic parameter for your route to build dynamic queries in your app.
Pass a contextual parameter to your GraphQL queries to render your objects contextually
Select the ID of an object and pass it as a parameter to the next screen to render contextual data or details of the selected object.
For the moment you can use only 1 dynamic parameter by route, so if you have the route
You canยดt nest more dynamic parameters for the moment, for example:
Use a new path for your new dynamic parameter or use local or global variables instead.