This is what I used to have:
(defn static-data []
(for [row (range 10)]
{:a "some" :b "fake" :c "data"}))
(def app-state (atom {:items (static-data)}))
;;; components
(defn item [_ _]
(om/component
(dom/div nil "I'm a row of data")))
(defn list [state _]
(om/component
(om/build-all item (:items state))))
;;; mount!!
(om/root app-state list (.getElementById js/document "some-id"))
That static-data
list comprehension might be the reason behind it failing. I get this error in my Chrome console: Uncaught Error: Cannot build Om component from non-cursor {:a "some" :b "fake" :c "data"}
.
Any thoughts?
pardon missing closing parens :)