Router rewrite
#1789
Replies: 1 comment
-
I created the PR (#1791). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
i was playing around with writing a SPA router and ended up with a working Yew router with this API:
I find it an improvement over the current router design in a few ways
RouterAgentDispatacher
RouterService
No need to pass everything down as props
RouterAnchor
(or similar)However, this API has one downside: the routes are stringly typed instead of being an
enum
. There are some workarounds to this (like storing route string inconst
s and using those) though.Thoughts on this design?
I will be making a PR where we can discuss (and improve on) the implementation details.
Beta Was this translation helpful? Give feedback.
All reactions