   (if (= status :open) 0 1))
 
 (defui TodoListUI
-  static om/IQuery
-  (query [this]
-         [{:tudu/items (om/get-query TodoItemUI)}])
   Object
   (render [this]
-          (let [{:keys [tudu/items]} (om/props this)
-                tui-cprops {:close-item #(close-item reconciler %)}]
+          (let [{:keys [tudu/items]} (om/props this)]
             (dom/div #js {:className "todo-list-items"}
-                     (map #(todo-item-ui (om/computed % tui-cprops))
+                     (map todo-item-ui
                          (sort-by (juxt status-to-order :id) items))))))
 
 (def todo-list-ui (om/factory TodoListUI))

                            :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 ""})

