Application layout is only one part of the user interface equation. Another part is styling. In this lesson we’ll explore the className
and style
prop for styling our components. This lesson goes much deeper than that. We’ll learn why className
is className
and not class
(like it is in HTML), and we’ll learn why the style
prop accepts an object of camelCase styles rather than a string of css (like it does in HTML). We’ll take it even further by creating a reusable component that encapsulates these styles and composes the given className
and style
prop together. You’re going to love this one.
Finally, when you actually build a full application, a tool you’ll find invaluable is Tailwind.css.