react-动态路由

react-动态路由

  • 学习资源推荐:https://blog.csdn.net/qq_42813491/article/details/90213353

代码

  • 设置
    <Route path="/newsInfo/:nid" component={NewsInfo} />
  • 取值
{this.props.match.params.nid}

效果图

在这里插入图片描述


在这里插入图片描述

发布了450 篇原创文章 · 获赞 787 · 访问量 16万+

猜你喜欢

转载自blog.csdn.net/qq_42813491/article/details/92590341