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

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.
主站蜘蛛池模板: 海兴县| 兴海县| 青铜峡市| 民县| 遂溪县| 砚山县| 新丰县| 兴山县| 偃师市| 天台县| 高碑店市| 肇州县| 张家川| 修武县| 平阳县| 镇安县| 监利县| 稷山县| 宜宾市| 余姚市| 社会| 繁峙县| 姚安县| 苏尼特左旗| 商南县| 大宁县| 松原市| 修水县| 电白县| 铜梁县| 鹿泉市| 株洲市| 札达县| 清苑县| 如东县| 容城县| 汨罗市| 汕头市| 得荣县| 堆龙德庆县| 绥棱县|