What is the difference between the state and init-state options for the build 
functions ?

Both seem to be merged into the state, but they behave differently.

The following code works with state

  om/IRenderState
    (render-state [_ state]
      (let [services (get-in app-state[:selected-domain :services])
            first-name (get (first services) :name )]
        (if (:show state)
          (dom/div nil
                   (om/build header/component (get-in app-state 
[:selected-domain]))
                   (om/build customer-info/component (get-in app-state 
[:selected-domain :customer-info]))
                   (om/build service-info/component services
                             {:state {:selected-service first-name}}))
          (dom/span nil ""))))))

But with init state selected-service  is nil.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to