官术网_书友最值得收藏!

Project initiation

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:

  1. Inside your project folder, in your terminal, type yarn init and hit enter.
  2. 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!
  3. 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?

主站蜘蛛池模板: 武夷山市| 佛坪县| 太白县| 齐齐哈尔市| 婺源县| 阿勒泰市| 平顺县| 郴州市| 四平市| 九江县| 诸城市| 谢通门县| 彰武县| 钦州市| 彰武县| 峡江县| 黔江区| 麻栗坡县| 丹东市| 佛冈县| 丹巴县| 遂平县| 丹巴县| 天门市| 泸定县| 尼勒克县| 历史| 鄂托克前旗| 雷山县| 涪陵区| 洪江市| 辰溪县| 固安县| 哈密市| 师宗县| 荆门市| 碌曲县| 永福县| 兴山县| 永年县| 仁布县|