Experimental attempt to remove need to have RouteResolver
in core
#2941
Replies: 8 comments
-
So if I could get access to that primitive, I could factor the entire mess out of core and into a third-party library. (Smaller core is always a plus IMHO.) |
Beta Was this translation helpful? Give feedback.
-
This came as a product of a Gitter conversation with @barneycarroll, BTW. |
Beta Was this translation helpful? Give feedback.
-
@pygy and @tivac, what are your thoughts on this? Also, is there a chance this could ride the v2 train? (The requisite method would be implemented and shipped on v1 as well, but the removal would have to wait for v2.) Oh, and the relevant Gitter conversation took place here. |
Beta Was this translation helpful? Give feedback.
-
Alternatively, we could provide a method to just get the default route, and I could just use |
Beta Was this translation helpful? Give feedback.
-
@isiahmeadows this is not equivalent to RouteResolvers: It will not preserve layouts on route change, and will not keep the previous endpoint live while the async route is pending. |
Beta Was this translation helpful? Give feedback.
-
Ugh...I made a few edits to make it wrap |
Beta Was this translation helpful? Give feedback.
-
An easier alternative would be to make every route an As for route resolvers, with render functions (instead of render components) whose vnodes are diffed on route change, that would make my bit a little easier - I could write it as a simple component instead, without having to wrap anything. It'd also have benefits for those using common base layout components, as those would simply diff, and they wouldn't need to wrap |
Beta Was this translation helpful? Give feedback.
-
Update: no Edit: So a userland wrapper would just call However, we would want to move |
Beta Was this translation helpful? Give feedback.
-
People have been having weird issues and pretty specialized needs that route resolvers alone can't deal with. Also, I managed to reduce it to using only a single extra, trivial primitive that simply redirects to the default route (without having to trigger a hash change or anything like that).
Beta Was this translation helpful? Give feedback.
All reactions