Skip to content

Commit

Permalink
add comment about usage of root-el var
Browse files Browse the repository at this point in the history
  • Loading branch information
drapanjanas committed May 30, 2017
1 parent f24bbe7 commit 761daa6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/cljs-om-next/main_dev.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@

(core/init)

;; Do not delete, root-el is used by the figwheel-bridge.js
(def root-el (core/app-root))
2 changes: 2 additions & 0 deletions resources/cljs-reagent/main_dev.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

(def cnt (r/atom 0))
(defn reloader [] @cnt [core/app-root])

;; Do not delete, root-el is used by the figwheel-bridge.js
(def root-el (r/as-element [reloader]))

(figwheel/watch-and-reload
Expand Down
2 changes: 2 additions & 0 deletions resources/cljs-reagent6/main_dev.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

(def cnt (r/atom 0))
(defn reloader [] @cnt [core/app-root])

;; Do not delete, root-el is used by the figwheel-bridge.js
(def root-el (r/as-element [reloader]))

(defn force-reload! []
Expand Down
2 changes: 2 additions & 0 deletions resources/cljs-rum/main_dev.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@

(core/init)


;; Do not delete, root-el is used by the figwheel-bridge.js
(def root-el (core/root-component-factory))

0 comments on commit 761daa6

Please sign in to comment.