Reputation: 1051
I'm a bit new with React, react-router, and flux, and I'm curious.
I'm curious, what's the difference between the 2 types of link click handling.
My feeling is location.href
may "reset" the application, like if page was reloaded.
Is that right or wrong? And what's the difference between the 2 methods? Cause I'm not always able to use history.push
in the application.
Thanks a lot in advance!
Upvotes: 1
Views: 1545
Reputation: 6803
The HTML5 History API gives developers the ability to modify a website's URL without a full page refresh
whereas location.href will cause the page to refresh
Upvotes: 4