Fork me on GitHub
#reitit
<
2020-02-20
>
drewverlee22:02:44

My frontend app is using reitit. When it loads we initialize some state via rfh/start! router and a navigation set function. Part of the functionality of the app is that it uses path-params to configure parts of the http requests. e.g /name/test vs /name/main And those changes impact requests on the first html page that is loaded. This is a new feature and so i'm having to reorganize how state is handled so that those names are used by the http requests. Prior to that, when we called initialized the router and history, i never had to worry about the parth params, query-params, etc... before a navigation happened. Now i do. How would i get the path-params via reitit before a navigation on the router has happened?

drewverlee22:02:07

i'm aware i can get the href via window.location.href then just parse it. i just wondered if there was a way to do that via reitit