reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
2021-04-12T11:33:18.076100Z

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.

ikitommi 2021-04-12T11:39:49.077600Z

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?

2021-04-12T15:08:42.078500Z

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.

2021-04-12T17:01:49.079Z

Is there a way to retrigger navigation to the current URL?

2021-04-12T17:02:04.079400Z

Like act as if we did another push-state of the same value?

2021-04-12T18:20:13.079700Z

I ended up just forcing the controller to refire, which works for my case.

juhoteperi 2021-04-12T18:27:08.080900Z

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.

juhoteperi 2021-04-12T18:29:32.083Z

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.