I'm having trouble understand how I can create a "default" route in reitit, when none of my other routes match. I'm trying to switch to this from secretary, but there's a lot I don't understand at this point.
I don’t think there is an easy way in frontend routing for that. I think the whole frontend routing would need some extra ❤️ , could be simpler and smaller. I do not have time for that, but maybe others?
It seems like a common use case. It's nice to be able to ensure exhaustive handling in anything that's trying to enumerate all of the different types of URLs in an application.
Is there a way to retrigger navigation to the current URL?
Like act as if we did another push-state of the same value?
I ended up just forcing the controller to refire, which works for my case.
Hmh, I was quite sure there is default-handler for frontend, but it is indeed Ring only.
I think it should still return a match, with nil
name or something like that. I think that's how I'm checking for not-found view usually.
For retrigger, when using in a app with re-frame, the on-navigate callback only dispatches an event. If I need to retrigger the routing logic, I'll just dispatch that event with the current match from app-db. Usually that handles the parts that I want to trigger anyway.