   (dispatch [:initialise-db])
   (reagent/render [main-panel] (js/document.getElementById "app")))
 
-                 ;; you must always return the db+;; you must always return the db
  :visible-todos
  (fn
    [db _]
    (let [todos     (reaction (:todos @db))
          showing   (reaction (:showing @db))]
    (reaction (filter (filter-fn-for @showing)
                      (vals @todos))))))


(register-sub
  :completed-count

            [:input#toggle-all
             {:type "checkbox"
              :checked (pos? @completed-count)
              :on-change #(dispatch [:complete-all-toggle])}]
            [:label {:for "toggle-all"} "Mark all as complete"]
            [todo-list visible-todos]]
           [stats-footer]])]
