Installing React
To start using the React library, we need to first install it. I am going to show you two ways of doing this: the simplest one and the one using the npm install
command.
The simplest way is to add the <script>
tag to our ~/snapterest/build/index.html
file:
- For the development version of React, add the following command:
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0-beta3/react.js"></script>
- For the production version version of React, add the following command:
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.0-beta3/react.min.js"></script>
There is a difference between the two that we'll learn about in the later chapters of this book. For our project, we'll be using the development version of React.
At the time of writing, the latest version of React library is 0.14.0-beta3. Over time, React gets updated, so make sure you use the latest version that is available to you, unless it introduces...