I'm finding the basic Om tutorial at github.com/swannodette/om/wiki/Basic-Tutorial confusing:

(ns om-tut.core
  (:require [om.core :as om :include-macros true]
            [om.dom :as dom :include-macros true]))

(enable-console-print!)

(def app-state (atom {:text "Hello world!"}))

(om/root
  (fn [app owner]
    (reify om/IRender
      (render [_]
        (dom/h1 nil (:text app)))))
  app-state
  {:target (. js/document (getElementById "app"))})

"... The first argument is a function that takes the application state data and the backing React component, here called owner.
..... The second argument is the application state atom ....."

What's the difference? Which is which? The distinction is lost on me as app isn't referred to elsewhere and app-state also contains application state data.

gvim





--
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