I'm relatively new to React; apologies if this is a really naive question.
What are the technical advantages to browserHistory
that make it preferable over hashHistory
? For example, is there a major performance/efficiency boost from it using the History API?
The docs state that browserHistory
is recommended, even though this comes at the cost of the additional server config and needing to hard-code or configure your base URL for different servers via basename.
hashHistory
"just works", however, regardless of the base URL from which the files are served. No server config needed. Bundle your app, host it from any URL/path on a server, good to go.
It might be good if the docs went a bit further in explaining why it browserHistory
is recommended even though it involves more complexity.