 (def todo-edit (with-meta todo-input
                  {:component-did-mount #(.focus (reagent/dom-node %))}))
 
-(defn stats-footer []
+(defn stats-footer
+  []
   (let [footer-stats (subscribe [:footer-stats])]
     (fn []
       (let [[active done filter] @footer-stats
             props-for (fn [filter-kw]
                         {:class (if (= filter-kw filter) "selected")
                          :on-click #(dispatch [:set-showing filter-kw])})]
+        (println active done filter)
         [:footer#footer
          [:div
           [:span#todo-count

  todo-middleware
  (fn
    [todos _]
    (let [completed-ids (->> (vals todos)     ;; use a transducer XXX
                             (remove :done)
                             (map :id))]
      (reduce #(dissoc %1 %2)
              todos
              completed-ids))))

;; -- Subscriptions ---------


            [:button#clear-completed {:on-click #(dispatch [:clear-completed])}
             "Clear completed " done])]]))))

(defn todo-item
  []
  (let [editing (atom false)]
    (fn [{:keys [id done title]}]
      [:li {:class (str (if done "completed ")
