   (reaction (get-in @db [sid element-id])))
 
 (register-sub :note general-query)
+(register-sub :threads general-query)
 (register-sub :ui-state general-query)
 (register-sub :search-state general-query)
 (register-sub :credentials general-query)



(defn memory-thread []
  (let [show?  (subscribe [:ui-state :show-thread?])
        thread (subscribe [:note :thread])]
    (fn []
      [Modal {:show @show? :onHide #(dispatch [:state-show-thread false])}
       [ModalBody

  (fn [app-state _]
    (let [note (get-in app-state [:note :current-note])]
      (POST "/api/thoughts" {:params        {:thought note :refine_id (get-in app-state [:note :focus :id])}
                             :headers       {:authorization (str "Token " (get-in app-state [:credentials :token]))}
                             :handler       #(dispatch [:memory-save-success note])
                             :error-handler #(dispatch [:memory-save-error %])}))
    (assoc-in app-state [:ui-state :is-busy?] true)))

(register-handler
