      (let [rid (<! resource-chan)]
        (>! (:to-send connection) {:cmd :action :action [:new-column {:id rid :header header}]})))))
 
+(defn delete-column [connection column]
+  (go (>! (:to-send connection) {:cmd :action :action [:delete-column {:id column}]})))
+
 (defn new-note [connection column text]
   (let [resource-chan (new-resource connection)]
     (go

                                                            (.. e -target -value)))})
                 (dom/button #js {:onClick create-column}
                             "Add column"))))))

(defn create-note-button [app owner]
  (reify

(defmethod apply-action :new-column [initial-state [_ action]]
  (let [{:keys [id header]} action]
    (assoc initial-state id {:header header :notes {}})))

(defmethod apply-action :delete-column [initial-state [_ action]]
  (let [{:keys [id]} action]
    (dissoc initial-state id)))

(defmethod apply-action :new-note [initial-state [_ action]]
  (let [{:keys [id column text]} action]
