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
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey I notice in a lot of components we use
props.classand pass that to acnhelper. 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.classinstead?Beta Was this translation helpful? Give feedback.
All reactions