- 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.
推薦閱讀
- 機(jī)器學(xué)習(xí)系統(tǒng):設(shè)計(jì)和實(shí)現(xiàn)
- Clojure for Domain:specific Languages
- Getting Started with PowerShell
- VSTO開發(fā)入門教程
- Django Design Patterns and Best Practices
- Learning Hadoop 2
- 軟件測(cè)試綜合技術(shù)
- Visual Basic程序設(shè)計(jì)基礎(chǔ)
- 深入理解Java虛擬機(jī):JVM高級(jí)特性與最佳實(shí)踐
- Learning TypeScript
- Docker on Windows
- Python全棧開發(fā):數(shù)據(jù)分析
- ASP.NET jQuery Cookbook(Second Edition)
- JavaScript程序設(shè)計(jì)基礎(chǔ)教程(慕課版)
- Python編程:從入門到實(shí)踐(第2版)