|
|
|
|
|
by oliverx0
2457 days ago
|
|
I love styled components for React. They are a great way to separate the styling logic from JSX, yet keeping it at a glance in the same file as the component. Essentially, you don’t have to remember CSS classes name. It is also a great way to have very granular styling when needed. The fact that you can encapsulate the component in another styled component makes it so that you can have general styles and more specific ones whenever you want. I would personally recommend it over css files for any react project. Also, if you are using a react framework such as material UI or ant design, styled components make it very easy to change the style of those without braking anything. |
|