From the course: Building Modern Projects with React
Unlock this course with a free trial
Join today to access over 24,400 courses taught by industry experts.
Why do we need styled-components? - React.js Tutorial
From the course: Building Modern Projects with React
Why do we need styled-components?
- [Instructor] All right, so moving on to the next ecosystem tool. Now that we've taken a look at selectors, we're going to take a look at a tool that makes it easier to manage styles in our React applications. And this is something called styled components. Now the question here is why would we need styled components in the first place, and what do they actually allow us to do? We'll see what these styled components look like exactly very shortly, but just like what we did back when we were talking about Redux Thunk, let's take a moment to think about the current state of our application. Right now, Redux is managing our application's state, Thunk is managing the side effects and interactions with the server, selectors are abstracting away the structure of the state so that our components can just worry about what data they want and not where to find it, and our components are managing the UI. And they will also need to manage the styles if we want to add those styles to them, right?…