mirror of
https://github.com/metosin/reitit.git
synced 2025-12-16 16:01:11 +00:00
Reorder some example code
This commit is contained in:
parent
143bf06290
commit
9f798c63c9
1 changed files with 9 additions and 9 deletions
|
|
@ -7,6 +7,14 @@
|
|||
[reitit.frontend.controllers :as rfc]
|
||||
[reitit.frontend.easy :as rfe]))
|
||||
|
||||
;;; Effects ;;;
|
||||
|
||||
;; Triggering navigation from events.
|
||||
|
||||
(re-frame/reg-fx :push-state
|
||||
(fn [route]
|
||||
(apply rfe/push-state route)))
|
||||
|
||||
;;; Events ;;;
|
||||
|
||||
(re-frame/reg-event-db ::initialize-db
|
||||
|
|
@ -16,7 +24,7 @@
|
|||
{:current-route nil})))
|
||||
|
||||
(re-frame/reg-event-fx ::push-state
|
||||
(fn [db [_ & route]]
|
||||
(fn [_ [_ & route]]
|
||||
{:push-state route}))
|
||||
|
||||
(re-frame/reg-event-db ::navigated
|
||||
|
|
@ -49,14 +57,6 @@
|
|||
[:div
|
||||
[:h1 "This is sub-page 2"]])
|
||||
|
||||
;;; Effects ;;;
|
||||
|
||||
;; Triggering navigation from events.
|
||||
|
||||
(re-frame/reg-fx :push-state
|
||||
(fn [route]
|
||||
(apply rfe/push-state route)))
|
||||
|
||||
;;; Routes ;;;
|
||||
|
||||
(defn href
|
||||
|
|
|
|||
Loading…
Reference in a new issue