DEV Community

Discussion on: πŸ’… Styled-Components: Extending Children

Collapse
 
thatzacdavis profile image
Zachary Davis

Thanks for the tip! I've done a bunch of crazy things with this library, but not this. It might actually help simplify some of the weird things I've done like giving children classNames just to target from the parent.

Collapse
 
bendman profile image
Ben Duncan • Edited

Personally I don't mind the use of className for targeting children, as it solves a few of the problems mentioned here by specifying which element you're targeting. As long as you follow some clear naming convention like BEM to avoid conflicts it sounds like a fine idea to me, reminiscent of vanilla CSS.

I'm certainly open to hear other opinions though!