                 (let [next-sib (.-nextSibling cur-child)]
                   (remove-dom-node cur-child)
                   (recur next-sib)))))
+          ()
           cur-dom-node))
       (do
         ;(println "build hit" (first vdom) (first cur-vdom))


(declare get-transition)

(defn- init-element-state! [dom-node element-spec]
  (let [node-id (str auto-node-id)
        state (ElementState. node-id false element-spec nil)]
    (set! auto-node-id (inc auto-node-id))
    (set-attr! dom-node "data-freactive-id" node-id)
    (when-let [m (meta element-spec)]
      (when-let [on-disposed (get m :node-disposed)]
        (set! (.-disposed-callback state) on-disposed)))
    (aset element-state-lookup node-id state)
    ;;(set! element-state-lookup (assoc element-state-lookup dom-node state))
    state))

        (let [old-attrs? (second cur-vdom)
              new-attrs? (second vdom)
              new-attrs (when (map? new-attrs?) new-attrs?)]
          (reset-element-spec! cur-state vdom)
          (replace-attrs! cur-dom-node
                          cur-state
                          (when (map? old-attrs?) old-attrs?)
                          new-attrs)
          (let [new-children (if new-attrs (nnext vdom) (next vdom))
                dangling-child (try-diff-subseq cur-dom-node (.-firstChild cur-dom-node) new-children)]
            (loop [cur-child dangling-child]
