Create React App, by default, supports us getting CSS into our application in a number of different ways.
We can get CSS directly into our components by writing a style attribute and giving it some arbitrary CSS, as in the following code:
const Example = () => {
return (
<div className="Example" style="border: 1px solid red;">
Hello
</div>
);
};
This will give us a little div with the word Hello in it, surrounded by a single-pixel red line for the border. While this is something you technically can do, generally speaking, you should avoid it. Using inline style statements like the preceding example makes it hard to keep your styles organized and track them down when formatting does go awry. Plus, if a designer or another non-developer needs to update the look and feel (for example, if the standard colors...