@flyboarder hey, any idea why shadow cljs adds things instead of replacing in the body when doing live reload?
hmmm got a workaround for the live reload thing in shadow cljs
(ns ^:dev/once index.mount
(:require
[hoplon.core :as h]
[javelin.core :as j]
[hoplon.jquery]
concierge.mount))
(defn to-element! [el]
(el
[
(h/h1 "Concierge")
(concierge.mount/to-element (h/div))]))
(let [mountpoint (atom (h/div))]
(defn remount! []
; clear out hoplon data from mountpoint div
(h/hl! @mountpoint :hoplon/reset nil)
; create a new div for mountpoint
(reset! mountpoint (h/div))
; flush the DOM in the document body
(set! (.-innerHTML (h/body)) "")
; drop the new mountpoint into the body
(h/html
(h/body
@mountpoint))
; rebuild everything
(to-element! @mountpoint)))
; hook into shadow cljs
(defn ^:dev/after-load start! []
(remount!))
(start!)
need to manually flush the body element with a buffer div to mount everything into