Liking cljdoc? Tell your friends :D

reitit.frontend.easy

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.
raw docstring

historycljs

source

hrefcljs

(href k)
(href k params)
(href k params query)
source

push-statecljs

(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.
sourceraw docstring

replace-statecljs

(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.
sourceraw docstring

start!cljs

(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:

  • 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.
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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close