 (defn datatype-name [x]
   (cond
    (#{:ref/id :ref/js} (:type x)) "ref"
+   (satisfies? table/ITable x) "table"
    (or (true? x) (false? x)) "boolean"
    (keyword? x) "keyword"
    (number? x) "number"

                        (add-step|swap! cursor "foo"))}
    "string"]
   [:button {:onClick (fn []
                        (add-step|swap! cursor true))}
    "boolean"]
   [:button {:onClick (fn []
                        (add-step|swap! cursor [1 2 3]))}
    "list"]
   [:button {:onClick (fn []
                        (add-step|swap! cursor {"name" "aurora"
                                                "awesomeness" 100000000}))}
    "table"]])

(defdom ref-inserter [page cursor]

             "list" (fn [x]
                      (list-ui x))
             "table" (fn [x]
                       (if (map? @x)
                         (table-map-ui x)
                         (table-ui x)))}))

;;*********************************************************
;; Aurora state
