How to dynamically set body class?
toggling
isDrawerOpen
has no effect, class "none" added all the time.15 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
nah, i'm using reactivity transform, it works this way. The problem is
useHead
called only once, so it doesn't change when my reactive ref variable changes.Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
any ideas?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
thought about it, but isn't it ugly?
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
seems like i have no other way, thanks
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
yeah, i kinda recall it worked in Nuxt2
i could just call
this.head
but it was a bit hacky
seems like no one has idea about that lolUnknown User•2y ago
Message Not Public
Sign In & Join Server To View
useHead is fully reactive
see here for class usage https://unhead.harlanzw.com/guide/guides/class-attr
Class Attribute · Unhead
Learn how to use the class attribute with Unhead.
the issue is that you're resolving the ref value as part of the argument
that should work
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View