      :format :json
      :handler simple-handler
      :error-handler error-handler}))
+
+;;event handlers
 
 (defn add-comment [evt owner {:keys [author text comm] :as data}]
   (.preventDefault evt)

           (load-data comm)
           (while true
            (let [ [t value] (<! comm)]
              (handle-event t app value))))))

    om/IRenderState
    (render-state [_ {:keys [comm]}]


;;main component

(defn handle-comm-event [t app val]
  (case t
    :add (om/transact! app :comments #(conj % val))
    :init (om/update! app {:comments val})
    nil))

(defn render-comment-list [{:keys [comments]}]
  (apply dom/ul #js {:className "commentList"}
    (om/build-all comment-view comments)))


(defn comment-box [app owner]
    (reify
