Stylesheet
Explore how to directly apply CSS in React projects compiled with Transcrypt. Learn to use external stylesheets, target HTML elements, assign className in React components, and strategically update styles based on application state.
We'll cover the following...
We'll cover the following...
Directly utilize CSS in our app
We’ll start with using a simple stylesheet as we would for any other static website. For that, we first need a CSS file, and we’ll call it app.css.
Using HTML element type
Some of the selectors in our CSS file apply directly to an HTML element type, and some use a named CSS class selector. The style attributes for the native element selectors will be automatically applied to the referenced ...