Ok so a lot of information. Now let's install React onto our system.
- Create a folder called reactJs.
- Inside that create a myApp folder.
- Inside that create a public folder.
- Inside this folder create an index.html file.
React is a JS library so it is available as a CDN (Content Delivery Network).
<html> <head></head> <body> <script src="https://firstname.lastname@example.org/umd/react.development.js"></script> <script src="https://email@example.com/umd/react-dom.development.js"></script> </body> </html>
React needs two libraries to work.
- The first one [firstname.lastname@example.org] we have added contains the core syntax of React like createElement() function etc.
- The second one [email@example.com] is ReactDOM. This is used to render elements basically.
We will need one more guy called Babel to help us out.