   [:div
    "The atom " [:code "click-count"] " has value: "
    @click-count ". "
-   [:input {:type "button"
-            :value "Click me!"
+   [:input {:type "button" :value "Click me!"
             :on-click #(swap! click-count inc)}]])
 
-(defn local-state []
+(defn atom-input [{:keys [value]}]
+  [:input {:type "text"
+           :value @value
+           :on-change #(reset! value (-> % .-target .-value))}])
+
+(defn shared-state []
   (let [val (atom "foo")]
     (fn []
       [:div
        [:p "The value is now: " @val]
-       [:p "Change it: "
-        [:input
-         {:type "text" :value @val
-          :on-change #(reset! val (-> % .-target .-value))}]]])))
+       [:p "Change it here: "
+        [atom-input {:value val}]]])))
 
 (defn timer-component []
   (let [seconds-elapsed (atom 0)]


   [:p "Cloact supports most of React's API, but there is really only
   one entry-point that is necessary for most applications: "
   [:code "cloact.core/render-component"] "."]

   [:p "It takes too arguments: a component, and a DOM node. For
   example, splashing the very first example all over the page would

  [:div
   [:h2 "Introduction to Cloact"]

   [:p "Cloact provides a minimalistic interface between "
    [:a {:href "https://github.com/clojure/clojurescript"} "ClojureScript"]
    " and " [:a {:href "http://facebook.github.io/react/"} "React"]
    ". It allows you to define React components using nothing but
    plain ClojureScript functions, that describe your UI using a
    Hiccup-like syntax."]

   [:p "A very basic component may look something like this: "]
   [demo-component {:comp simple-component
