React中为什么接收不到url中的参数?
2020-02-19 10:35:38
有同学问为什么接收不到参数,大家看明白了吗?
图1

图2

图3

原因在于路由定义时,没有写:id参数,图3修改成如下代码即可
```react
<Route path="/article/edit/:id" component={Edit}></Route>
```