- 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.
推薦閱讀
- Node.js 10實戰(zhàn)
- Neo4j Essentials
- Blockly創(chuàng)意趣味編程
- Full-Stack Vue.js 2 and Laravel 5
- Monitoring Elasticsearch
- SSM輕量級框架應(yīng)用實戰(zhàn)
- KnockoutJS Starter
- Kotlin從基礎(chǔ)到實戰(zhàn)
- Java SE實踐教程
- 深入剖析Java虛擬機:源碼剖析與實例詳解(基礎(chǔ)卷)
- UI設(shè)計全書(全彩)
- Qt5 C++ GUI Programming Cookbook
- SQL Server 入門很輕松(微課超值版)
- 分布式架構(gòu)原理與實踐
- Python Automation Cookbook