  :attempts
  (fn
    [db _]
-   (reaction (:attempts @db))))
+   (let [failed-letters (reaction (:failed-letters @db))]
+     (reaction (count @failed-letters)))))
 
 
 (register-sub

          (assoc db :key "")))))


(register-handler
  :inc-attempts
  (path [:attempts])
  (fn
    [attempts [_]]
    (.log js/console (str "inc-attempts handler:"  attempts))
    (inc attempts))) ;; return the new version of db

;; -- Subscription Handlers ---------------------------------------------------


    ;; new value
    [db [_ value]]
    (assoc db :timer value)))    ;; return the new version of db





(register-handler
