- 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.
- Learning Scala Programming
- Unity Virtual Reality Projects
- Django:Web Development with Python
- R語言數據可視化實戰
- UI智能化與前端智能化:工程技術、實現方法與編程思想
- SAS數據統計分析與編程實踐
- 數據結構與算法分析(C++語言版)
- 運用后端技術處理業務邏輯(藍橋杯軟件大賽培訓教材-Java方向)
- Natural Language Processing with Python Quick Start Guide
- 零基礎輕松學C++:青少年趣味編程(全彩版)
- Learning Kotlin by building Android Applications
- Beginning PHP
- Learning IBM Bluemix
- Java EE 7 First Look
- Python架構模式:精通基于Python的API設計、事件驅動架構和包管理