props.class
vs $attrs.class
#606
kylemilloy
started this conversation in
General
Replies: 1 comment
-
Reason we used class as props is mentioned in the PR link |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey I notice in a lot of components we use
props.class
and pass that to acn
helper. I get the sense this is a holdover from converting this from react to vue where we have to explicitly define a class prop for components however in vue we can leverage$attr.class
.Is my assumption correct or is there another reason we're explicitly defining a class prop? If that is the reason, can we reduce some boilerplate by using
$attr.class
instead?Beta Was this translation helpful? Give feedback.
All reactions