 
 (defn canvas [data owner]
   (reify
-    om/IInitState
-    (init-state [_]
-      {:drawing? false})
     om/IDidMount
     (did-mount [_]
       (repaint (.getContext (om/get-node owner) "2d")

(enable-console-print!)

(def app-state
  (atom {:canvas {:dimensions {:width 800 :height 400}
                  :actions []}
         :tools {:lineWidth 4
                 :strokeStyle "#000000" }}))

    (did-update [_ prev-props prev-state]
      (repaint (.getContext (om/get-node owner) "2d")
               (:actions data)))
    om/IRender
    (render [_]
      (dom/canvas
        (clj->js
          (merge (:dimensions data)
