React router renders component after a refresh

前端 未结 1 1456
無奈伤痛
無奈伤痛 2021-01-25 11:22

This is a strange issue, but when I try to do a redirect using a link, nothing happens, just the URL changes. But when I refresh the browser the component gets rendered. What am

相关标签:
1条回答
  • 2021-01-25 12:00

    You define multiple Router instances. However, there should be exactly one Router instance. The Router is typically placed pretty much "top-level" within your App / Main / Root component.

    0 讨论(0)
提交回复
热议问题