DEV Community

Discussion on: Pass all props to children in Vue

Collapse
 
malinyamato profile image
Malin Yamato Lääkkö

,,,think I got it thanks to your reply -- so, the parent only regards its own declared props as props and puts them into $props. All other arguments, which are passed into to parent but unknown by the parent, are dumped into $attr. :)

Thread Thread
 
jwkicklighter profile image
Jordan Kicklighter

Yep, that's a good way to put it! Your origin question is how I assumed Vue worked, but after working on the sample in the Codepen I realized that $attrs and $props were separate.