react-router环境简单搭建
[https://ant.design/docs/react/use-with-create-react-app-cn]首先,根据此链接完成react的安装,然后,使用命令npm install react-router-dom
,npm install history --save
在package.json中安装相应的环境,接着,新建router.js和在home.js
router.js代码如下
app.js代码如下
home.js代码如下: