vrouter
vrouter copied to clipboard
Allow custom objects in VRouterData
The original Navigator API allowed passing an Object? 'arguments' into the new route. Other Nav 2.0 packages seem to support similar functionality - for instance, Beamer supports a completely custom route state. A simple Object? parameter on VRouterData would be really useful for me...while I can parse query parameters and search provider states for relevant data, it's often already available at the point of navigation. :)
@CosmicPangolin - How does this relate to what is being proposed in PR #176? This draft PR was focused on passing a custom value to the widget builder for a nested widget, but perhaps this concept could be extended in a similar way to be more general? The PR needs some help though because with it there are GlobalKey errors for reasons I can't discern.
Closing because this is not something I was to support.
Here are a few reasons:
- Not type/compile safe
- Leads to unexpected issues when using the web because your navigator (ex: Chrome) don't ever let your using pass an object.
I understand this limitation is quite an issue when working on mobile but I believe that you can easily create a type-safe wrapper when it's needed which is what I want to encourage.