I'm new to Clojure/Clojurescript and Om and after a bit of a struggle, I came up with this way to render a table from a 2d vector:
(def app-state (atom {:world [[1 2 1] [2 1 1] [1 2 1]]}))
(defn cell
[text]
(om/component
(dom/td nil text)))
(defn row
[data]
(om/component
(apply dom/tr nil
(om/build-all cell data))))
(defn world-view
[data owner]
(om/component
(apply dom/table nil
(om/build-all row (:world data)))))
(om/root
world-view
app-state
{:target (. js/document (getElementById "app"))})
I am looking for pointers about how I could make this more concise or how I could create the entire table from one component function.