   )
 
 (defn -instrument [sub-component cursor m]
-  {:sub-component sub-component
-   :cursor cursor
-   :m m}
+  (dom/div #js {:data-huh-sub-component sub-component
+                :data-huh-cursor (.stringify js/JSON cursor)
+                :data-huh-m (.stringify js/JSON m)})
+  )
+
+(defn decode-sub-component [sub-component]
+  {:sub-component (js/eval (str "("
+                                (.getAttribute sub-component
+                                               "data-huh-sub-component")
+                                ")"))
+   :cursor (.parse js/JSON (.getAttribute sub-component "data-huh-cursor"))
+   :m (.parse js/JSON (.getAttribute sub-component "data-huh-m"))}
   )
 
 (defn test-predicates

   [om.core :as om :include-macros true]
   [om.dom :as dom :include-macros true]
   [clojure.string :refer [lower-case]]
   )
  )


  ([expected-component cursor m]
     (fn -sub-component-pred [component]
       (let [expected-name (component-name expected-component)
             {actual-sub-component :sub-component
              actual-cursor :cursor
              actual-m :m} (decode-sub-component component)
             actual-name (component-name actual-sub-component)]
         (cond
          (not= expected-component actual-sub-component)
          {:msg "sub-component does not match"
           :expected expected-name :actual actual-name}

