why createHashHistory is "for use in legacy web browsers"?
why createHashHistory is "for use in legacy web browsers"? (https://github.com/ReactTraining/history) How createBrowserHistory is better for SPA route management?
No any search results
You already invited:
2 Answers
Amos
Upvotes from:
for example, I use it in an app between the pages "basket" and "checkout". In basket, user selects some items. Then proceeds to checkout with those. I set the IDs of selected values in the state of the location - but I do not show them in the URL.
Still, if you F5/refresh in checkout page - the IDs are still there
..first I had them in the URL, but user could do too much crazy things, and I had to handle too many error cases
browser history helped me there
Daryl k
Upvotes from:
(in file .htaccess in server root)
it means: When a request comes, check if there is a correspronding file on the server. If there is, hand it out.
If there isn't , rewrite to index.html
And for nginx it's probably just a one-liner in config, not sure.