     (when-not (nil? obj)
       (let [captured (.-cljsCaptured obj)]
         (set! (.-cljsCaptured obj)
-              (oset-add (if (nil? captured) (make-oset) captured)
-                        derefable)
-              #_(conj (if (nil? captured) #{} captured)
+              (conj (if (nil? captured) #{} captured)
                     derefable))))))
 
 

          (ra-notify-watches ra ra.state ra.state))))))

(defn- ra-update-watching [ra derefed]
  (oset-for-each derefed
                 (fn [w]
                   (when-not (oset-contains? ra.watching w)
                     (add-watch w ra ra-handle-change))))
  (oset-for-each ra.watching
                 (fn [w]
                   (when-not (oset-contains? derefed w)
                     (remove-watch w ra))))
  ;; (doseq [w derefed]
  ;;   (when-not (contains? ra.watching w)
  ;;     (add-watch w ra ra-handle-change)))
  ;; (doseq [w ra.watching]
  ;;   (when-not (contains? derefed w)
  ;;     (remove-watch w ra)))
  (set! ra.watching derefed))

(deftype Reaction [f ^:mutable state ^:mutable dirty? ^:mutable active?

    (let [oldstate state
          res (capture-derefed f this)
          derefed (captured this)]
      (when (not= derefed watching)
        (ra-update-watching this derefed))
      (when-not active?
        (when debug (swap! -running inc))
        (set! active? true))
