 (defn history-component
   [db]
   (let [h (r/cursor db [:states])
-        state-count (r/cursor db [:count])
         current (r/cursor db [:current])]
     (fn [db]
       [:div {:class "wrapper"}

                                (= :reverse dir) (reverse)))]
     (go-loop []
       (when-let [index (<! indices-chan)]
         (log (str  "Playing index " index))
         (fire :history-navigated index)
         (<! (timeout 30))
         (recur))))))

;; Data

(defonce app-db (atom {:x 360 :y 360 :radius 50 :fill "black" :clicks 0}))
(defonce history (atom {:states [] :current 0}))
(defonce event-handlers (atom {}))

;;; Utilities
