I am working with a Vue component and I would like to determine, from within the component itself, which classes have been applied to it.
Is there a way to accomplish this?
Currently, I am using a workaround where I pass the class as a prop
:
<my-component someprop="hello" classprop="red" class="red"></my-component>
While this method works for static classes, it will break if the class is dynamically bound.