      :keywords? true
      :handler (partial get-comments #(put! comm [:init %] ))
      :error-handler error-handler}))
+
 
 (defn save-commemnt [new-comment]
   (POST "http://localhost:3000/comments"

      (let [comm (chan)]
        (om/set-state! owner :comm comm)
          (go
           (load-data comm)
           (while true
            (let [ [t value] (<! comm)]
              (handle-comm-event t app value))))))

    om/IRenderState
    (render-state [_ {:keys [comm]}]
      (dom/div #js {:className "commentBox"}
        (dom/h1 nil "Comments")
        (render-comment-list app)
        (om/build comment-form nil {:init-state {:comm comm}})))))

(om/root
  comment-box

(ns ^:figwheel-always my-todo.core
    (:require-macros [cljs.core.async.macros :refer [go]])
    (:require [om.core :as om :include-macros true]
              [sablono.core :as html :refer-macros [html]]
              [om.dom :as dom :include-macros true]
              [cljs.core.async :refer [put! chan <!]]
              [ajax.core :refer [GET POST]]))
