- React Router Quick Start Guide
- Sagar Ganatra
- 89字
- 2021-07-23 16:41:32
Adding the React-Router library
Now that we have our sample application up and running, let's add React-Router library as a dependency using npm:
npm install --save react-router-dom
This command will download and add react-router-dom to the /node_modules directory. The package.json file now includes this as a dependency:
"dependencies": {
"react": "^16.4.0",
"react-dom": "^16.4.0",
"react-router-dom": "^4.3.0",
"react-scripts": "1.1.4"
}
At the time of writing this book, version 4.3.0 of react-router-dom was available. You can try the alpha and beta builds by mentioning react-router-dom@next when including the library using npm.
推薦閱讀
- Learning Neo4j
- DevOps with Kubernetes
- Docker and Kubernetes for Java Developers
- Hands-On Machine Learning with scikit:learn and Scientific Python Toolkits
- 軟件架構設計:大型網站技術架構與業務架構融合之道
- Windows Server 2012 Unified Remote Access Planning and Deployment
- Python數據分析(第2版)
- Learning Python by Building Games
- HTML5從入門到精通 (第2版)
- 微服務架構深度解析:原理、實踐與進階
- Mastering Git
- RESTful Java Web Services(Second Edition)
- 區塊鏈技術進階與實戰(第2版)
- Android應用開發實戰(第2版)
- Simulation for Data Science with R