成都网站建设设计

将想法与焦点和您一起共享

react路由参数改变不重新渲染页面

  1. 问题描述:
    从
    /test/1
    跳转到
    /test/2
    ,url改变了,页面没重新渲染
  2. 解决办法(先跳转到其它页面,再跳转到目标页面):
    this.props.history.push("/another")
    var $this = this
    setTimeout(function(){
    $this.props.history.push("/destination/"+param)
    },100)

本文题目:react路由参数改变不重新渲染页面
网站路径:http://chengdu.cdxwcx.cn/article/ippido.html