All the examples and lessons on React are not essential for understanding TypeScript and to proceed with reading the book.
However, even if you do not know React or if you currently use other frameworks we think you will be useful to put the concepts into practice immediately with real examples.
Although the main topic of this book is TypeScript, we will do many examples with React to demonstrate how some concepts about the language can be applied to real-world use cases.
Many of the concepts can still be applied to Angular , Vue or your favorite frontend framework, but also server side when used with NodeJS .
Explain how React works is outside the scope of the book.
If you are interested in further details, we recommend the excellent official React documentation
We can also write multiline templates and apply CSS classes using the className attribute (that works similar to the native class HTML attribute):
src/App.tsx
The text-3xl and italic CSS classes are available thanks to the integration of Tailwind and DaisyUI (which our code playgrounds includes by default in index.html)
You can easily create a React project on your computer using ViteJS , as explained in the previous lesson, and selecting React from the options.
Vite also offers the option to use JavaScript or TypeScript. Choose the latter.