mirror of
https://github.com/metosin/reitit.git
synced 2025-12-24 02:48:25 +00:00
Fix event definitions for routes with parameters
The current implementation will fail for `(re-frame/dispatch [::navigate ::some-route {:some :params}])`.
Update the definitions of `::navigate` and `::navigated!` events to accept the full route arguments.
This commit is contained in:
parent
ca7403ccab
commit
031a777c8c
1 changed files with 3 additions and 3 deletions
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
(re-frame/reg-event-fx
|
||||
::navigate
|
||||
(fn [db [_ route]]
|
||||
(fn [db [_ & route]]
|
||||
;; See `navigate` effect in routes.cljs
|
||||
{::navigate! route}))
|
||||
|
||||
|
|
@ -59,8 +59,8 @@
|
|||
;; Triggering navigation from events.
|
||||
(re-frame/reg-fx
|
||||
::navigate!
|
||||
(fn [k params query]
|
||||
(rfe/push-state k params query)))
|
||||
(fn [route]
|
||||
(apply rfe/push-state route)))
|
||||
|
||||
;;; Routes ;;;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue