How to refresh a Page using react-route Link

前端 未结 3 813
一向
一向 2020-12-24 04:42

I am trying to refresh a page using react-route Link. But the way I have implemented it goes to the URL one step back.(as an example if the URL was ../client/home/register a

3条回答
  •  猫巷女王i
    2020-12-24 05:25

    To refresh page you don't need react-router, simple js:

    window.location.reload();
    

    To re-render view in React component, you can just fire update with props/state.

提交回复
热议问题