How to use react-router 4.0 to refresh current route? not reload the whole page

后端 未结 7 2183
暖寄归人
暖寄归人 2021-01-01 19:35

\'react-router-dom\' has refresh function here, but I don\'t know how to call this method, also their well formatted document doesn\'t bother to explain this.

windo

7条回答
  •  一个人的身影
    2021-01-01 20:04

    This is how I achieved it :

    if (currentUrl == newUrl) {
        props.history.push("/temp");
        props.history.goBack();
    }
    

提交回复
热议问题