Fork me on GitHub
#reitit
<
2018-03-09
>
ikitommi13:03:14

@josesanch currently, matching by arbitrary data is not supported (would require a linear scan of all routes). Also, the match-by-name index doesn't check for conflicting names, I think it should. That said, the use case is interesting and opening up the functions to create the name-index would make the lookup easy to support this.

ikitommi13:03:04

you can do this already with the current public api, but bit ugly code: read the compiled routes with r/routes, create a lookup map from route info, with (juxt :name :language) of route data as key and a manually constructed Match as the value. Name this match-by-name-and-language and use (match-by-name-and-language [:home :en])

ikitommi13:03:10

could you write an issue out of this?

ikitommi13:03:57

could open the helpers to make this easy (and fast).