classList not working on icons svg
I had to use
${props.data.empty ? 'hidden' : ''}
any reason why?6 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
thank you both! ill try it out
This is addressed in the docs, you should not use class and classList together
See the second to last paragraph in this section https://www.solidjs.com/docs/latest/api#classlist
SolidJS
Solid is a purely reactive library. It was designed from the ground up with a reactive core. It's influenced by reactive principles developed by previous libraries.
yes but
The main safe situation is when class is set to a static string (or nothing), and classList is reactive
Yeah but the child (where it is being applied to the DOM) can't tell if class is dynamic or not. And more than likely spreading them so order matters
Not saying that's good but that's what is happening