   Object
   (render [this]
           (let [{:keys [id status title]} (om/props this)
-                {:keys [close-item]} (om/get-computed this)
                 closed? (= status :close)
                 class-name (str "todo-list-item-title status-" (name status))]
             (dom/div #js {:className "todo-list-item" :key (str "todo-item-" id)}
                      (dom/input #js {:type "checkbox" :disabled closed?
                                      :checked closed?
-                                     :onClick #(close-item id)})
+                                     :onClick #(close-item this id)})
 
                      (dom/span #js {:className class-name} title)))))
 

                            :tudu.item/editing :tudu/items]))

(defui NewTodoItemUI
  static om/IQuery
  (query [this]
         [:tudu.item/editing])
  Object
  (render [this]
          (let [{:keys [tudu.item/editing]} (om/props this)
                {:keys [title]} editing
                on-change (on-change-cb reconciler task-title-change)]
            (dom/div #js {:className "new-todo-item-form"}
                      (dom/div #js {:className "form-group"}
                               (dom/label nil "Task")
                               (dom/input #js {:value title
                                               :onChange on-change}))
                      ; NOTE: I have to pass the reconciler here and not the
                      ; component otherwise I get:
                      ; Error: No queries exist for component path (tudu.ui/UI tudu.ui/NewTodoItemUI)
                      (dom/button #js {:className "new-todo-item-create"
                                       :onClick #(create-task reconciler editing)}
                                  "Create")))))

(def new-todo-item-ui (om/factory NewTodoItemUI))

    [cljs.core.async.macros :refer [go]]))

(enable-console-print!)

(def clean-item-editing {:title ""})

