component scoped private props

I’ve seen KPow do this in several videos with the locally scoped custom prop whose value is set to a global prop but then in the modifier class, changes the global prop.

Haven’t really grasped why he changes the global one (sans underscore) instead of the local one (with underscore). Or vice versa just abstain from making a local and just use the global. I’m sure there’s a good reason but why ? Wouldn’t you want to change the locally scoped
:nth-of-type(2){ —_border: hotpink ; }
That has the indicator (the underscore) that it’s a private prop if you’re going to declare it anyway? Is it just to ensure a fallback? People coming upon the modifier class (.bubble-1) will see —border and go looking in the root for it?
1070F158-CE8A-4112-991E-8C51C7E52518.jpg
Was this page helpful?