                (set! (.-dirty state) true)
                (when-not (.-updating state)
                  (set! (.-updating state) true)
-                 (queue-animation animate)))))]
+                 (queue-animation animate)))))
+
+          binding-invalidated (:binding-invalidated ref-meta)
+
+          invalidate (if binding-invalidated
+                       (fn binding-invalidated-wrapper
+                         ([key child-ref _ _] (binding-invalidated-wrapper key child-ref))
+                         ([key child-ref]
+                          (when (binding-invalidated (.-cur-element state) child-ref)
+                            (invalidate key child-ref))))
+                       invalidate)]
       (set! (.-animate state) animate)
       (set! (.-invalidate state) invalidate)
       (when-let [binding-disposed (get (meta child-ref) :binding-disposed)]
         (set! (.-disposed-callback state) binding-disposed))
       (when-let [parent-state (get-element-state parent)]
-        (register-with-parent-state parent-state (str "-reactive" id) state))
+        (register-with-parent-state parent-state id state))
       (when-let [binding-initialized (get (meta child-ref)
                                           :binding-initialized)]
         (binding-initialized))

  (when-let [[add-watch* remove-watch*] (r/get-add-remove-watch* ref)]
    (let [attr-state #js {:disposed false}
          key [element attr-name]
          f (fn on-value-ref-invalidated
              ([]
               (on-value-ref-invalidated key ref))
              ([key ref _ _]
               (on-value-ref-invalidated key ref))
              ([key ref]
               (remove-watch* ref key)
               (queue-animation
                 (fn [_]
                   (when-not (.-disposed attr-state)
                     (add-watch* ref key on-value-ref-invalidated)
                     (set-fn (non-reactively @ref)))))))]
      (register-with-parent-state node-state
                                  (str "-" state-prefix "." attr-name) attr-state)
      (add-watch* ref key f)))
  (set-fn @ref))

(defn- bind-style-prop! [element attr-name attr-value node-state]
  (let [setter (fn [v]
                 ;(println "setting style" element attr-name v)
                 (set-style-prop! element attr-name v))]
    (if (satisfies? cljs.core/IDeref attr-value)
      (bind-attr* setter element "style" attr-name attr-value node-state)

  (if-let [[add-watch* remove-watch*] (r/get-add-remove-watch* child-ref)]
    (let [id (new-reactive-id)
          state (ReactiveElement. id parent nil false false false nil  nil)

          ref-meta (meta ref)

          get-new-elem (fn []
                         (set! (.-dirty state) false)
