rename root-node to root-note!
This commit is contained in:
parent
055e123476
commit
f9317c7698
|
@ -16,7 +16,6 @@
|
||||||
'[:app/msg])
|
'[:app/msg])
|
||||||
Object
|
Object
|
||||||
(render [this]
|
(render [this]
|
||||||
(.log js/console "rendering app")
|
|
||||||
(let [{:keys [app/msg]} (om/props this)]
|
(let [{:keys [app/msg]} (om/props this)]
|
||||||
(view {:style {:flexDirection "column" :margin 40 :alignItems "center"}}
|
(view {:style {:flexDirection "column" :margin 40 :alignItems "center"}}
|
||||||
(text {:style {:fontSize 30 :fontWeight "100" :marginBottom 20 :textAlign "center"}} msg)
|
(text {:style {:fontSize 30 :fontWeight "100" :marginBottom 20 :textAlign "center"}} msg)
|
||||||
|
@ -26,7 +25,7 @@
|
||||||
:onPress #(alert "HELLO!")}
|
:onPress #(alert "HELLO!")}
|
||||||
(text {:style {:color "white" :textAlign "center" :fontWeight "bold"}} "press me"))))))
|
(text {:style {:color "white" :textAlign "center" :fontWeight "bold"}} "press me"))))))
|
||||||
|
|
||||||
(defonce RootNode (sup/root-node 1))
|
(defonce RootNode (sup/root-node! 1))
|
||||||
(defonce app-root (om/factory RootNode))
|
(defonce app-root (om/factory RootNode))
|
||||||
|
|
||||||
(defn init []
|
(defn init []
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
(ns re-natal.support
|
(ns re-natal.support
|
||||||
(:require [om.next :refer-macros [ui]]))
|
(:require [om.next :refer-macros [ui]]))
|
||||||
|
|
||||||
(def root-nodes (atom {}))
|
(defonce root-nodes (atom {}))
|
||||||
|
|
||||||
(defn root-node
|
(defn root-node!
|
||||||
"A substitute for a real root node (1) for mounting om-next component.
|
"A substitute for a real root node (1) for mounting om-next component.
|
||||||
You have to call function :on-render and :on-unmount in reconciler :root-render :root-unmount function."
|
You have to call function :on-render and :on-unmount in reconciler :root-render :root-unmount function."
|
||||||
[id]
|
[id]
|
||||||
|
|
Loading…
Reference in New Issue