-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Learn React with TypeScript
By :

React doesn’t offer a standard styling mechanism, and the community has developed many different approaches. In this chapter, we will learn a few of the most popular styling approaches.
We will use different approaches to style the alert component we worked on in previous chapters. First, we will use plain CSS and understand the pros and cons of this approach. Then, we will move on to use CSS modules, which will resolve plain CSS’s main problem. Next, we’ll use a library called Tailwind CSS, again understanding its pros and cons. Lastly, we’ll touch on a few other noteworthy styling approaches.
Additionally, we are going to learn how to use SVGs in React apps and use them in the alert component for the information and warning icons.
By the end of this chapter, you will have the knowledge to pick an appropriate styling approach for future React projects you work on.
We’ll cover the following topics...