         (object? props)
         (let [obj (js-obj)]
           (doseq [k (map name reserved-ks)]
-            (when-let [v (aget props k)]
+            (when-let [v (obj/get props k)]
               (aset obj k v)
               (js-delete props k)))
           [obj props])

(ns minreact.core
  (:require [cljsjs.react])
  (:require-macros [minreact.core :refer [genspec]])
  (:refer-clojure :exclude [set!]))


  if not present"
  ([s] (minreact-state s nil))
  ([s not-found]
   (or (some-> s (obj/get state-key)) not-found)))

(defn minreact-props
  "Return the minreact props of pure React component props p, not-found
  if not present"
  ([p] (minreact-props p nil))
  ([p not-found]
   (or (some-> p (obj/get props-key)) not-found)))

(defn state
  "Return the components current state"
