Fork me on GitHub
#reitit
<
2023-01-11
>
Dallas Surewood23:01:19

How can I read the current route from reitit on the frontend?

wevrem16:01:51

Using controllers. When you enter a route (and are taking care of apply-controllers) you can stash the current route somewhere for later reading. See https://cljdoc.org/d/metosin/reitit/0.5.18/doc/frontend/controllers#controllers

hifumi12312:01:03

If you're using re-frame, then you can also find a way to store the current route in your app-db then register a subscription for it. The reitit.frontend examples folder has a demo of this