The next thing we need to do is initiate our application as an npm project. Let's try it out, and then we'll discuss why we needed to do so:
- Inside your project folder, in your terminal, type yarn init and hit enter.
- It’ll ask you a series of questions. The first one is the most important--the name of our application. It should just take the name of the current folder (chatastrophe). If it doesn't, just enter chatastrophe. From there, just hit enter to skip the rest of the questions, accepting the default answers. These questions would matter more if we were planning on publishing our own package, but we're not, so no worries!
- If you take a look at your project folder after completing the yarn init, you'll notice that it added a package.json file with our project name and version. Our package.json is important, in that it will act as a list of our dependencies--the package we will install via yarn.
Enough talking about dependencies, though, let's install our first one! What better choice than to install React?