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

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.
主站蜘蛛池模板: 镇原县| 沭阳县| 绥化市| 文化| 周口市| 丹凤县| 西青区| 公安县| 恩平市| 宣城市| 涟源市| 岳阳县| 永春县| 方正县| 蓬莱市| 金乡县| 昌图县| 龙门县| 黎川县| 齐齐哈尔市| 陆丰市| 永泰县| 井陉县| 镇原县| 通江县| 孝感市| 呼伦贝尔市| 长宁区| 鸡东县| 江口县| 孟州市| 朝阳区| 昆明市| 黑河市| 肥城市| 潮安县| 南开区| 溧阳市| 江都市| 固始县| 苍梧县|