DEV Community

Discussion on: Best practices for React Components

Collapse
 
martinrojas profile image
martin rojas

Sure, this part is when using with styled-components, but more specifically with how it is done in the Material-UI framework material-ui.com/styles/basics/#hoo....

The main take away is that with the advent of CSS in JS it is possible to create fully self-contained components. By lowering the number of dependencies in other files it makes it easier when you or another developer in your team to clearly know what code affects the component.

Hope this clears it for you