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.

Passing props to styled-components

Passing props to styled-components

From the course: Building Modern Projects with React

Start my 1-month free trial

Passing props to styled-components

- [Instructor] Okay, now that we have all our styling converted over to styled components, you may be wondering what the point of all of that was. It didn't really reduce the amount of styling in our app and it also didn't make our app look any different. Well, in this video, we're going to learn about a feature of styled components that in my opinion, makes the initial work of incorporating them into our app completely worth it. Since you're most likely very familiar with React by this point, you'll know that one of the main features of React is that we can pass props to components in order to configure them in some way. For our TodoList items, for example, we pass in data that specifies the Todo that should be displayed in that particular component. Well one of the really nice things about styled components is that we can pass props to them as well and use those props to modify their styling and provide better visual…

Contents