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

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.
主站蜘蛛池模板: 内丘县| 腾冲县| 武乡县| 榆树市| 南安市| 灵武市| 济阳县| 义乌市| 常熟市| 临颍县| 彭水| 乌兰察布市| 姚安县| 抚州市| 伊通| 延津县| 长岭县| 易门县| 泉州市| 收藏| 新安县| 庆安县| 仙居县| 玉山县| 漳浦县| 崇仁县| 桂林市| 黄梅县| 凤翔县| 南昌市| 邳州市| 尼木县| 上虞市| 临海市| 鸡东县| 彭水| 揭东县| 错那县| 绥芬河市| 阿图什市| 云林县|