                                [toggle-state-view "toggle state viewer"]]})
     (db/remove-dev-bar))) 
 
+;force conditional code to be called on each reload
+;TODO: replace this with a function that figwheel can call on refresh
 (cond-render-dev-bar)
 (cond-render-state-view)
 
-(def init-state 
-  {:example-data (vec (range 1 5))})
-
-
+(defn small-button
+  [f label]
+  (b/button {:bs-style "primary"
+             :bs-size "xsmall"
+             :onClick f
+             :style #js {:width "15pt" 
+                         :marginRight "5px"
+                         :marginLeft "5px"}}
+            label))
 
 (defn reset-state
   []

  (reify
    om/IRender
    (render [_]
      (dom/div nil
               (dom/span nil (str "example component " data))
))))

(defn master-component
  [data owner]
  (reify
    om/IRender
    (render [_]
      (apply dom/div nil 
             (dom/h1 nil "Hello from {{name}}...")
             (om/build-all child-component (:example-data data))))))

(om/root master-component state {:target (gdom/getElement "app")})

            [goog.dom :as gdom]
            [{{name}}.devbar :as db]
            [{{name}}.state-viewer :as sv]
            [om-bootstrap.button :as b]
            [cljs.core.async :refer [<! >! put! chan]]))

(defonce app-name "{{name}}")
(defonce intro-text
  ["This is an example application using "
   (dom/a #js {:href "https://github.com/omcljs/om"} "Om")
   ". You can modify this example by editing "
   (dom/code nil (str "src/" app-name "/core.cljs"))
   "."])

(def init-state 
  {:example-data (mapv (fn [n] {:value n}) (range 1 5))})

(defonce state (atom init-state))

(declare reset-state cond-render-dev-bar cond-render-state-view)

