Skip to content

Instantly share code, notes, and snippets.

@viksit
Created October 8, 2014 07:49
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 viksit/f1e9744a2cda4b0bf9fa to your computer and use it in GitHub Desktop.
Save viksit/f1e9744a2cda4b0bf9fa to your computer and use it in GitHub Desktop.
;; (om/root autocomplete
;; app-state
;; {:target (. js/document (getElementById "autocomplete"))
;; :path [:autocomplete]})
;; (om/root timeline-view2
;; app-state
;; {:target (. js/document (getElementById "timeline"))
;; :path [:timeline]})
;; --- Combined state ---
;; (defn app-view [app owner]
;; (reify
;; om/IRenderState
;; (render-state [this {:keys []}]
;; (om/build autocomplete (:autocomplete app)
;; {:opts
;; {:target (. js/document (getElementById "autocomplete"))}})
;; (om/build timeline-view2 (:timeline app)
;; {:opts
;; {:target (. js/document (getElementById "timeline"))}})
;; )
;; ))
;; (om/root app-view
;; app-state
;; {:target (js/document.getElementById "timeline")})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment