 
 
 (defn- atom-like-state-swap! [instance & swap-args]
-  (let [new-value (apply swap! (.. instance -cljsState) swap-args)]
+  (let [new-value (apply swap! (aget instance "cljsState") swap-args)]
     (.setState instance (if-not-optimized
                           #js{:cljs new-value :js (clj->js new-value)}
                           #js{:cljs new-value}))



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


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

  IDeref
  (-deref [this]
    (when-let [state (.. instance -state)]
      (aget state "cljs")))
  ISwap
  (-swap! [this f] (atom-like-state-swap! instance f))
  (-swap! [this f a] (atom-like-state-swap! instance f a))
