   (reify
     om/IInitState
     (init-state [_] {:previous-click nil
+                     :previous-interval nil
                      :should-stop false})
     om/IDidMount
     (did-mount [_]

        (.addEventListener js/document "keydown" key-handler)
        (.addEventListener js/document "keyup" key-handler)))
    om/IRenderState
    (render-state [_ {:keys [tempo-channel previous-click should-stop]}]
                  (dom/button #js {:className "btn btn-default btn-lg btn-block btn-tap-tempo"
                                   :onClick (fn []
                                              (let [m (millis)]
                                                (om/set-state! owner :previous-click m)
                                                (when-not (nil? previous-click)
                                                  (put! tempo-channel (if should-stop false (- m previous-click))))))}
                              (if should-stop "stop" "tap tempo")))))

(defn dots [meter owner]

  (:require-macros [cljs.core.async.macros :refer [go]]))

(defonce app-setup
  (do
    (enable-console-print!)))

