                            (init-element-state! parent nil nil))]
       (let [state (get-element-state new-elem)]
         (set! (.-parent-state state) parent-state)
-        (register-with-parent-state parent-state
-                                    (get-node-id new-elem) state)
+        (register-with-parent-state parent-state (.-id state) state)
         state))))
 
 (defn- get-state-attr [state attr-str]


(defn- dispose-node
  ([dom-node]
   ;(println "disposing" dom-node)
   (when-let [state                                       ;;(aget element-state-lookup node-id)
              (get-element-state dom-node)]
     (dispose-node (.-id state) state)

      child-states
      (fn [child-state child-key _]
        (when (identical? (aget child-key 0) "-")
          (println "disposing attr" child-key)
          (.push to-remove child-key)
          (set! (.-disposed child-state) true)
          (when-let [cb (.-disposed-callback child-state)]
