Last active
August 29, 2015 14:03
-
-
Save Will-Sommers/67c5362dedf126e28f55 to your computer and use it in GitHub Desktop.
y-om-one
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def app-state (atom {:board-name "Yo yo yo, get it done!" | |
:columns [{:name "To Do"} | |
{:name "Doing"} | |
{:name "Done"}]})) | |
(defn column-component [data owner] | |
(reify | |
om/IRender | |
(render [_] | |
(dom/div #js {:className "column"} | |
(dom/div nil (:name data)) | |
(dom/div #js {:className "cards-wrapper"} | |
(dom/div nil "Cards go here")))))) | |
(defn app-component [data owner] | |
(reify | |
om/IRender | |
(render [_] | |
(apply dom/div nil | |
(om/build-all column-component (:columns data)))))) | |
(om/root | |
app-component | |
app-state | |
{:target (. js/document (getElementById "app"))}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment