DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
19.35k stars 740 forks source link

Require every field in router variants to be present in the route in the web history #2159

Closed ealmloff closed 3 months ago

ealmloff commented 3 months ago

In the web history if a field is not present in the URL, it will not be passed to the route (even without reloading the page). This PR adds a compiler error when the web feature is enabled and a field included in the router is not present in the URL.

jkelleyrtp commented 3 months ago

What's the plan to associate metadata with a route? Maybe later in the release we can add a metadata tag to the router that exempts fields from this rule?

Also are you trying to get this into the release?

ealmloff commented 3 months ago

Also are you trying to get this into the release?

Ideally, because this is a breaking change but it could also be pushed to 0.6

jkelleyrtp commented 3 months ago

Cool, when tests pass I'll merge it