1

Whether it's using this.props.history.push or <Link to={}> the component won't rerender if it's already at the same url.

Sometime in my container there will be logic that render different pieces, I don't want to use window.location.reload() to hard refresh the entire thing.

Melissa93
  • 111
  • 1
  • 4

1 Answers1

-1

You can use history.pushState or history.replaceState. They should do the trick.

About the difference between them: https://stackoverflow.com/a/17507140/5709697

Prashant Pimpale
  • 9,685
  • 7
  • 35
  • 75
Azamat Zorkanov
  • 749
  • 1
  • 4
  • 9
  • what is the different btw `this.props.history.push` vs `history.pushState`? My question is about react-router not browser API. – Melissa93 Jul 23 '18 at 00:32