changed location of initization
This commit is contained in:
parent
7ba420ee33
commit
aa0f9fc4d2
|
@ -14,6 +14,13 @@
|
||||||
:initialize
|
:initialize
|
||||||
(fn
|
(fn
|
||||||
[db _]
|
[db _]
|
||||||
|
(dispatch [:add-todo "Rename Cloact to Reagent"])
|
||||||
|
(dispatch [:add-todo "Add undo demo"])
|
||||||
|
(dispatch [:add-todo "Make all rendering async"])
|
||||||
|
(dispatch [:add-todo "Allow any arguments to component functions"])
|
||||||
|
(dispatch [:add-todo "Use re-frame in the todomvc example"])
|
||||||
|
(dispatch [:complete-all true])
|
||||||
|
;; as the dispatches are async the next line is executed first
|
||||||
(merge db initial-db)))
|
(merge db initial-db)))
|
||||||
|
|
||||||
(register-pure-handler
|
(register-pure-handler
|
||||||
|
@ -98,15 +105,9 @@
|
||||||
(reaction (- (count @(subscribe [:items]))
|
(reaction (- (count @(subscribe [:items]))
|
||||||
@(subscribe [:done])))))
|
@(subscribe [:done])))))
|
||||||
|
|
||||||
(dispatch [:initialize])
|
|
||||||
|
|
||||||
(defonce init (do
|
|
||||||
(dispatch [:add-todo "Rename Cloact to Reagent"])
|
(defonce init (dispatch [:initialize]))
|
||||||
(dispatch [:add-todo "Add undo demo"])
|
|
||||||
(dispatch [:add-todo "Make all rendering async"])
|
|
||||||
(dispatch [:add-todo "Allow any arguments to component functions"])
|
|
||||||
(dispatch [:add-todo "Use re-frame in the todomvc example"])
|
|
||||||
(dispatch [:complete-all true])))
|
|
||||||
|
|
||||||
(defn todo-input [{:keys [title on-save on-stop]}]
|
(defn todo-input [{:keys [title on-save on-stop]}]
|
||||||
(let [val (atom title)
|
(let [val (atom title)
|
||||||
|
|
Loading…
Reference in New Issue