This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-08
Channels
- # admin-announcements (3)
- # arachne (1)
- # aws (2)
- # beginners (10)
- # boot (287)
- # cider (5)
- # clara (2)
- # cljs-dev (150)
- # cljsjs (2)
- # clojure (99)
- # clojure-austin (1)
- # clojure-brasil (1)
- # clojure-dev (13)
- # clojure-greece (55)
- # clojure-japan (1)
- # clojure-nl (2)
- # clojure-russia (24)
- # clojure-spec (184)
- # clojure-taiwan (1)
- # clojure-uk (45)
- # clojurescript (55)
- # clojurex (1)
- # cursive (20)
- # datascript (16)
- # datomic (1)
- # devcards (4)
- # events (10)
- # figwheel (1)
- # funcool (7)
- # hoplon (48)
- # immutant (1)
- # jobs (6)
- # lambdaisland (2)
- # lein-figwheel (19)
- # mount (36)
- # off-topic (37)
- # om (16)
- # om-next (17)
- # onyx (29)
- # planck (53)
- # proton (1)
- # pure-frame (1)
- # re-frame (40)
- # reagent (44)
- # remote-jobs (1)
- # ring (2)
- # robots (2)
- # rum (5)
- # slack-help (4)
- # spacemacs (27)
- # specter (82)
- # test-check (18)
- # test200 (1)
- # untangled (17)
When i render (dom/div #js {} #js {}) I get "1113 Uncaught Invariant Violation: Objects are not valid as a React child "
I wonder if there's something I can pass to figwheel-reload-hook that would reset react
I think you probably want something more like (dom/div #js {} []) - where the second argument is an empty array.
(I'm used to looking at it in https://github.com/r0man/sablono style, so maybe I'm getting that wrong, but the second arg is a list of elements to nest I think)
Or is the problem more that you don't want syntax errors to kill your session?
i tried
(defn figwheel-reload-hook []
(log/info "figwheel-reload-hook")
(set! (.-innerHTML (js/document.getElementById "app")) "")
(reset! core/app (uc/mount @core/app ui/Root "app"))
)
We use boot-reload, but I think we've had the same issue, especially when messing around with lifecycle methods I think - can get in a state where the only way to get back to a good state is just refreshing.