Skip to content

Instantly share code, notes, and snippets.

@andreloureiro
Created November 18, 2015 02:20
Show Gist options
  • Save andreloureiro/c32256a0e7738e91fc72 to your computer and use it in GitHub Desktop.
Save andreloureiro/c32256a0e7738e91fc72 to your computer and use it in GitHub Desktop.
(def init-state (atom {:title "Cycle!"}))
(defn main []
(let [{:keys [title]} @init-state
dom-obs (-> Observable
(.just title)
(.map #(div (h3 (str %)))))]
#js {:DOM dom-obs}))
(run main #js {:DOM (makeDOMDriver "#app")})
@justinwoo
Copy link

neat! do you have externs set up and all too? would be neat to see this work with advanced compilation.

@andreloureiro
Copy link
Author

Unfortunately not. This weekend I'll put some effort on it and try to get a wrapper or something working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment