Routing
jorgelainfiesta opened this issue · 2 comments
Glimmer doesn't have a stable routing solution yet. So we have to figure out what to do. From what I researched there's two routes to route.
-
Glimmer API website showcases a routing mechanism in https://github.com/glimmerjs/glimmer-api-docs/blob/master/src/ui/components/GlimmerApiDocs/component.ts
-
glimmer-router
is an initiative to have a declarative router in glimmer à lareact-router
. https://github.com/glimmer-router/glimmer-router
The mechanism implemente din the Glimmer API website seems quite temporal and custom. It's also tightly coupled
I think glimmer-router
is more promising. I've forked the repo and updated the dependencies to work with the latest Glimmer. However, there is a glimmer-related issue with the way services notify computed properties that the services are dirty. I'll submit a PR to the original repo as the author is interested in continuing the project now that Glimmer is more stable.
I'd rather not use glimmer-router but the solution in the gimmer api docs. That is very lightweight and simple and both those properties are what we're looking for here. Eventually we might be able to switch to Ember's new router solution but I doubt glimmer-router will be that - it seems like a dead end to me tbh.
Right, the solution in the glimmer api docs is quite simple. I'll start porting the code for our case.
Now that you mention it, for glimmer-router to be relevant we'd still need a way to do glimmer addons. So it's quite far from being a valid way.