This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-06-30
Channels
- # beginners (23)
- # boot (3)
- # cider (5)
- # clara (12)
- # cljs-dev (15)
- # clojure (18)
- # clojure-spec (24)
- # clojure-uk (23)
- # clojurescript (24)
- # data-science (2)
- # datascript (1)
- # datomic (12)
- # fulcro (51)
- # jobs (1)
- # jobs-discuss (1)
- # leiningen (1)
- # nrepl (1)
- # off-topic (1)
- # onyx (2)
- # re-frame (6)
- # reagent (14)
- # rum (1)
- # shadow-cljs (12)
- # spacemacs (3)
- # specter (1)
- # tools-deps (37)
- # vim (2)
How does one do something like change a css class on <body>
? The app is mounted inside the body tag by default - is there another way to mount the app than the default index.html that comes with the re-frame template? Do I do something like getElementsByTagName('body')
and work directly on the element?
Are you sure you need to put the class on the body
tag itself? You can't use a div inside that contains everything?
but yeah, if you need the body tag, I'd say getElementsByTagName
and JS interop would be the way to go.
Also, to be really pure, I'd implement that in an effect handler, since you're basically setting state outside of the re-frame app itself.