         (go-loop []
           (<! play-ch)
           (.play (. js/document (getElementById "audio")))
-          (om/update-state! owner #(merge % {:state :play}))
+          (om/transact! cursor #(merge % {:play true}))
           (recur))
         (go-loop []
           (<! stop-ch)
           (.pause (. js/document (getElementById "audio")))
-          (om/update-state! owner #(merge % {:state :stop}))
+          (om/transact! cursor #(merge % {:play false}))
           (recur))
-        {:state :play
-         :play-ch play-ch
+        {:play-ch play-ch
          :stop-ch stop-ch}))
     om/IRenderState
     (render-state [_ state]

                          :errors []
                          :console []
                          :beat-cursors []
                          :hive {}}))

(defn config [key]

                      (map (partial dom/li nil) cursor))))))

(defn button [{:keys [text click-chan]} owner]
  (let [render (fn [] (let [node (om/get-node owner)
                            b (Button. text (.getInstance FlatButtonRenderer))]
                        (om/update-state! owner #(merge % {:button b}))
                        (.render b node)
                        (gevents/listen b Component.EventType.ACTION
                                        #(go (>! click-chan true)))))]
  (reify
    om/IInitState
    (init-state [_] {})
    om/IRenderState
    (render-state [_ state] (dom/div nil nil))
    om/IDidMount
    (did-mount [_]
      (render))
    om/IWillUpdate
    (will-update [_ next _]
      (let [b (:button (om/get-state owner))
            prev (om/get-props owner)]
        (when-not (= next prev)
          (.dispose b))))
    om/IDidUpdate
    (did-update [_ prev _]
      (when-not (= text (:text prev))
        (render))))))

(defn hive-view [{:keys [cursor save-state-ch load-state-ch]}]
  (reify
