Styled Components

Learn how to style components rather than each tag individually.

Consistent CSS

If we want the style for a particular element to be consistent everywhere we use it, another option is to create a styled component. This is where we create a new reusable React component for the sole purpose of giving it a fixed style. We would use our custom-styled element that has the style we want already applied to it. We do that for our Edit and Delete buttons by creating a styled component called Button (with a capital “B”).

Get hands-on with 1200+ tech skills courses.