Skip to content

Instantly share code, notes, and snippets.

@Will-Sommers
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Will-Sommers/67c5362dedf126e28f55 to your computer and use it in GitHub Desktop.
Save Will-Sommers/67c5362dedf126e28f55 to your computer and use it in GitHub Desktop.
y-om-one
(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