deetstrab
Reactively add/remove a class name to <body>, from within a component...
I have a component with a boolean ref. As long as
myBool.value === true
, I'd like to bind a class name to <body>
.
I've attempted to use the useMeta
and useMetaSafe
composables (useHead > bodyAttrs.class) but it doesn't change reactively.
Any idea what the heck I'm missing? This is driving me nuts and the documentation makes it sound relatively simple.45 replies