How to Use Styled Components with React Native | Beginner Course
Beto, April 11, 2022 · 1,993 views
Changing a component's look based on props with plain StyleSheet gets ugly fast. Styled Components brings CSS-in-JS to React Native: one styled button that flips colors when you pass , sensible defaults when you don't. I build the whole thing in the video, from install to composed components, and the code is free on codewithbeto.dev.
What's inside
- Install in a fresh Expo project
- Create a styled text component with real CSS syntax inside backticks
- Drive colors and sizes dynamically through props
- Build a styled button on top of
- Set default prop values so nothing breaks when props are omitted
- Why colocated, reusable styles scale better than plain StyleSheet
Resources

CourseReact Native course
Go deeper in the Style & Design section: 80 minutes on design systems and reusable components.
Had a win? Get featured on Code with Beto.Share your story
Like this article? Get the rest of the library plus weekly React Native tips. Free.