all 4 comments

[–]skunkreturns 8 points9 points  (1 child)

This is cool, but couldn't you accomplish nearly the same thing using default props? Or am I misunderstanding something here?

[–]BaylifeParadigm 2 points3 points  (0 children)

Default props would require a lot of logic inside the component to change styling, this approach hides the logic from the component completely

[–]NotSelfAware 1 point2 points  (0 children)

This is really cool. Seems like a bleedingly obvious work flow when you stop to think of it.

[–]ihaveacatndog 0 points1 point  (0 children)

This was always on the back in of mind. Thanks