Fork me on GitHub

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?


(from within an event handler, i guess?)


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.


right on - thanks. and yeah, i can probably lean on the designer a little bit 🙂