 (defn cursor
   "Provide a cursor into a Reagent atom.
 
-Behaves like a Reagent atom but focuses updates and derefs to
-the specified path within the wrapped Reagent atom. e.g.,
-  (let [c (cursor ra [:nested :content])]
-    ... @c ;; equivalent to (get-in @ra [:nested :content])
-    ... (reset! c 42) ;; equivalent to (swap! ra assoc-in [:nested :content] 42)
-    ... (swap! c inc) ;; equivalence to (swap! ra update-in [:nested :content] inc)
-    )
-
-The first parameter can also be a function, that should look something
-like this:
-
-(defn set-get
-  ([k] (get-in @state k))
-  ([k v] (swap! state assoc-in k v)))
-
-The function will be called with one argument – the path passed to
-cursor – when the cursor is deref'ed, and two arguments (path and new
-value) when the cursor is modified.
-
-Given that set-get function, (and that state is a Reagent atom, or
-another cursor) these cursors are equivalent:
-(cursor state [:foo]) and (cursor set-get [:foo]).
-"
+  Behaves like a Reagent atom but focuses updates and derefs to
+  the specified path within the wrapped Reagent atom. e.g.,
+    (let [c (cursor ra [:nested :content])]
+      ... @c ;; equivalent to (get-in @ra [:nested :content])
+      ... (reset! c 42) ;; equivalent to (swap! ra assoc-in [:nested :content] 42)
+      ... (swap! c inc) ;; equivalence to (swap! ra update-in [:nested :content] inc)
+      )
+
+  The first parameter can also be a function, that should look something
+  like this:
+
+  (defn set-get
+    ([k] (get-in @state k))
+    ([k v] (swap! state assoc-in k v)))
+
+  The function will be called with one argument – the path passed to
+  cursor – when the cursor is deref'ed, and two arguments (path and new
+  value) when the cursor is modified.
+
+  Given that set-get function, (and that state is a Reagent atom, or
+  another cursor) these cursors are equivalent:
+
+  (cursor state [:foo]) and (cursor set-get [:foo])."
   ([src path]
    (ratom/cursor src path)))
 


(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)))

(defn create-element
  "Create a native React element, by calling React.createElement directly.

  That means the second argument must be a javascript object (or nil), and
  that any Reagent hiccup forms must be processed with as-element. For example
  like this:

     (r/create-element \"div\" #js{:className \"foo\"}
        \"Hi \" (r/as-element [:strong \"world!\"])

  which is equivalent to

     [:div.foo \"Hi\" [:strong \"world!\"]]"
  ([type]
   (create-element type nil))
  ([type props]
