官术网_书友最值得收藏!

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.
主站蜘蛛池模板: 双桥区| 柘荣县| 宁国市| 东安县| 南丰县| 枞阳县| 西吉县| 隆昌县| 昆山市| 博湖县| 合山市| 墨竹工卡县| 岳阳市| 磐石市| 新和县| 庆元县| 遂宁市| 同德县| 白山市| 五常市| 平阴县| 阿坝县| 宽城| 原平市| 松原市| 凤阳县| 扎赉特旗| 吉水县| 南漳县| 阳春市| 洞口县| 余干县| 辽中县| 收藏| 皋兰县| 沅江市| 文成县| 哈密市| 平湖市| 德州市| 扶余县|