Manageable Styling for Reusable Components
Let's style our expandable component in this lesson!
Love it or hate it, styling (or CSS) is integral to how the web works.
While there’s a number of ways to style a React
component - and I’m sure you have a favorite - when you build reusable components, it’s always a good idea to expose a frictionless API for overriding default styles.
Usually, I recommend having your components be styled via both style
and className
props.
For example:
Get hands-on with 1200+ tech skills courses.