What you'll learn:
- Using Styled-Components in React Applications
What's up everybody this is John from Coding Addict and welcome to my Styled Components course.
As styled components co -creator Max Stoiber says:
“The basic idea of styled components is to enforce best practices by removing the mapping between styles and components.”
Styled Components are part of CSS inJSmovement where we can create components that possess their own encapsulated styles. No longer we need to create component decide on a selector and then rush to app css or any other stylesheet to write separate styles for that particular component. What makes Styled Components so cool is their awesome tagged template syntax that allows to create normal react components by only defining styles. With zero configuration styled-components support css modularity, variables in css, nesting in css, extending components styles and many more. Styled Components also allows us to write plain CSS in your components without worrying about class name collisions
Styled-components is a CSS-in-JS styling framework that uses tagged template literals in JavaScript and the power of CSS to provide a platform that allows you to write actual CSS to style React components.
Styled components are easy-to-make React components that you write with the styled-components library, where you can style your components with plain CSS inside your JavaScript code.