From the course: Building Modern Projects with React

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Why do you need styled-components?

Why do you need styled-components?

From the course: Building Modern Projects with React

Start my 1-month free trial

Why do you need styled-components?

- [Instructor] So far, we've done a very good job of separating out most of the logic from our components. We have redux to manage our application state, thunk to managed our side effects, and selectors to make it so that our components don't have to know how our state is set up or contain any logic for transforming the data we get from the state. So we're very close to having components that are truly free of all logic that doesn't belong. We're going to take one more step toward this goal of separation of concerns and that's by adding something called styled components to our project to make it a little easier to, well as you may have guessed by the name, style our components. Currently, our app is using CSS modules in order to style how our components look and this is an extremely common practice. But in my opinion, using CSS modules with React falls a little short of ideal. First of all, having an extra CSS file for…

Contents