                                  (call-fn
                                   :get-initial-state get-initial-state (default-arg-map this)))
                          state (merge state (:initial-state-override (props this)))]
-                     (if (.. this -cljsState)
+                     (if (aget this "cljsState")
                        ;; State already exists. Component was probably hot-reloaded,
                        ;; so don't initialize.
                        (if-not-optimized
                          #js{:cljs state :js (clj->js state)}
                          #js{:cljs state})
                        (let [locals-atom (atom nil)]
-                         (set! (.-cljsLocals this) locals-atom)
-                         (set! (.. this -cljsState) (atom state))
+                         (aset  this "cljsLocals" locals-atom)
+                         (aset this "cljsState" (atom state))
                          (maybe-report-state-change this state)
                          (if-not-optimized
                            #js{:cljs state :js (clj->js state)}

  (-swap! [this f a b xs] (apply atom-like-state-swap! instance f a b xs))
  IReset
  (-reset! [this new-value]
    (reset! (.. instance -cljsState) new-value)
    (.setState instance (if-not-optimized
                          #js{:cljs new-value :js (clj->js new-value)}
                          #js{:cljs new-value}))



(defn- props [instance]
  (aget (.. instance -props) "cljs"))


(defn- maybe-report-state-change [instance new-state]
