Автор: Ajdin Imsirovic
Издательство: Leanpub
Год: 2022-10-08
Страниц: 171
Язык: английский
Формат: pdf (true), epub
Размер: 10.2 MB
This book is my answer to the question: how to teach React to a complete beginner, in as little time as possible? Need to learn the basics quickly? This is your book.
React is a library for the web, written in the jаvascript language. The purpose of this library is to code the UI of our websites. To be more efficient working with React, I highly recommend installing React Developer Tools in your browser of choice.
If you’re starting this book, I expect you at least have Node.js and NPM installed on your machine. I’m also assuming that you did use a code editor before, and that you’re comfortable, or at least familiar with VS Code. If not, then this book might be too advanced for you - but still, give it a try. I’ve written it with the intention of making it accessible even for almost a complete web development beginner. Still, a level of knowledge of HTML, CSS, and JS will go a long way. The more you know the above three technologies, the easier this book will be.
Let’s build the simplest possible React app. To do this, we’ll use a very popular tool: Create React App. Before we can use this tool, we need to be sure that our system has the minimal required versions of Node.js and NPM installed, so let’s open a folder where we want to install our React app, and let’s open the bash console, pointing at this folder. Now we’ll verify our versions of Node.js and NPM are within minimum requirements.
Thing is, the React ecosystem is pretty big. This technology is in constant motion. A yesterday’s best practice is no longer the way things are done today. On top of all these changes, there are some practical considerations: what if a reader of this book meets with an older React code base? What if they’re met with a new one? Trying to give an optimal answer to these questions is what led to this interesting situation:
• in chapter 1, we’ve set up our React locally, and we’ve installed an app using create-react-app; we’ve served it using the CLI and inspected it using the React extension for Chrome
• in chapter 2, we had to “start” from scratch, by showing another way of doing things, using a CDN - and we’ve tried out the react and react-dom libraries; this chapter was just a quick detour to be aware of the fact that there’s an alternative way of using React. We’ve also seen that in order to do anything substantial, we need to use Babel for JSX transpilation.
Now, in the chapter 3, we’re “back to the basics”, in the sense that we’re continuing from where we left off at the end of Chapter 1. However, now we should have a better idea of why things are done the way they are.
Скачать React from Scratch : A friendly guide for absolute beginners