diff --git a/modules/reitit-frontend/src/reitit/frontend/easy.cljs b/modules/reitit-frontend/src/reitit/frontend/easy.cljs index 6f812293..59313567 100644 --- a/modules/reitit-frontend/src/reitit/frontend/easy.cljs +++ b/modules/reitit-frontend/src/reitit/frontend/easy.cljs @@ -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] diff --git a/modules/reitit-frontend/src/reitit/frontend/history.cljs b/modules/reitit-frontend/src/reitit/frontend/history.cljs index 9b59fe0e..03583cbe 100644 --- a/modules/reitit-frontend/src/reitit/frontend/history.cljs +++ b/modules/reitit-frontend/src/reitit/frontend/history.cljs @@ -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: