Clean frontend routing docstrings

This commit is contained in:
Juho Teperi 2018-08-27 14:22:21 +03:00
parent 9729a7424e
commit b99e25ef4f
2 changed files with 8 additions and 5 deletions

View file

@ -15,15 +15,15 @@
remove listeners using stop! call before calling start! again.
Parameters:
- router The Reitit routing tree.
- on-navigate Function to be called when route changes. Takes two parameters, ´token´ and ´history´ object.
- 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."
[routes on-navigate opts]
[router on-navigate opts]
(swap! history (fn [old-history]
(rfh/stop! old-history)
(rfh/start! routes on-navigate opts))))
(rfh/start! router on-navigate opts))))
(defn href
([k]

View file

@ -102,11 +102,14 @@
(defn start!
"This registers event listeners on HTML5 history and hashchange events.
Returns History object.
When using with development workflow like Figwheel, rememeber to
remove listeners using stop! call before calling start! again.
Parameters:
- router The Reitit routing tree.
- router The Reitit router.
- on-navigate Function to be called when route changes. Takes two parameters, ´match´ and ´history´ object.
Options: