Easy wrapper over reitit.frontend.history, handling the state. Only one router can be active at a time.
Easy wrapper over reitit.frontend.history, handling the state. Only one router can be active at a time.
(push-state k)
(push-state k params)
(push-state k params query)
Sets the new route, leaving previous route in history.
Sets the new route, leaving previous route in history.
(replace-state k)
(replace-state k params)
(replace-state k params query)
Replaces current route. I.e. current route is not left on history.
Replaces current route. I.e. current route is not left on history.
(start! router on-navigate opts)
This registers event listeners on HTML5 history and hashchange events. When using with development workflow like Figwheel, rememeber to remove listeners using stop! call before calling start! again.
Parameters:
Options:
This registers event listeners on HTML5 history and hashchange events. When using with development workflow like Figwheel, rememeber to remove listeners using stop! call before calling start! again. Parameters: - router The Reitit router. - on-navigate Function to be called when route changes. Takes two parameters, ´match´ and ´history´ object. Options: - :use-fragment (default true) If true, onhashchange and location hash are used to store the token.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close