- Progressive Web Apps with React
- Scott Domes
- 218字
- 2021-07-08 09:36:15
Installing React
Let’s try it by running yarn add react@15.6.1 from within your project folder.
Once the installation is complete, you should see React added to our package.json under dependencies. You'll also see that yarn generated a node_modules folder and a yarn.lock file.
The node_modules folder is where all our packages will live. If you open it up, you can see that there are several folders already. We've not only installed React, but everything that React depends on--dependencies on dependencies.
As you might imagine, the node_modules folder can get quite hefty. So, we don't check it into source control. When a new developer joins the team and downloads the project files, they can then install the dependencies independently, based on the package.json; this saves time and space.
However, we need to ensure that they get the same packages as everyone else, and the same version; this is where the yarn.lock file comes in.
The previously mentioned setup ensures that we are ready to safely use third-party libraries. We have the package.json, yarn.lock, and node_modules folders in our project. Before we continue, let's ensure that adding React worked.
- 多媒體CAI課件設計與制作導論(第二版)
- 計算思維與算法入門
- 實用防銹油配方與制備200例
- Python數據分析(第2版)
- Learning Vaadin 7(Second Edition)
- Bootstrap 4 Cookbook
- 一塊面包板玩轉Arduino編程
- HTML+CSS+JavaScript網頁設計從入門到精通 (清華社"視頻大講堂"大系·網絡開發視頻大講堂)
- Web App Testing Using Knockout.JS
- Python計算機視覺和自然語言處理
- 算法超簡單:趣味游戲帶你輕松入門與實踐
- Beginning PHP
- Mastering XenApp?
- C/C++程序設計教程
- 多接入邊緣計算實戰