 
 (defn atom
   "Like clojure.core/atom, except that it keeps track of derefs.
-Reagent components that derefs one of these are automatically
-re-rendered."
+  Reagent components that derefs one of these are automatically
+  re-rendered."
   ([x] (ratom/atom x))
   ([x & rest] (apply ratom/atom x rest)))
 


(defn adapt-react-class
  "Returns an adapter for a native React class, that may be used
just like a Reagent component function or class in Hiccup forms."
  [c]
  (assert c)
  (tmpl/adapt-react-class c))


(defn state
  "Returns the state of a component, as set with replace-state or set-state.
  Equivalent to (deref (r/state-atom this))"
  [this]
  (assert (comp/reagent-component? this))
  (deref (state-atom this)))

(defn replace-state
  "Set state of a component.
  Equivalent to (reset! (state-atom this) new-state)"
  [this new-state]
  (assert (comp/reagent-component? this))
  (assert (or (nil? new-state) (map? new-state)))
