Using hash history instead of browser history?
See original GitHub issueOn previous versions we were able to pass a hash history to the connectRoutes
function, like:
const history = createHashHistory()
export const {reducer, middleware, enhancer} = connectRoutes(
history,
routesMap,
options
)
It seems like now, with history handled internally, there is no way to use hash history anymore, is that correct and intended?
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
javascript - What is the difference between hashHistory and ...
3) Browser History in static file server will have one real location on our server to fetch our HTML from while Hash history...
Read more >A little bit of history - Medium
Browser and hash histories are both intended to be used in a browser. They interact with the history and location web APIs so...
Read more >What is the difference between browser history and hash ...
hashHistory uses URL hashes, along with a query key to keep track of state. hashHistory requires no additional server configuration, but is generally...
Read more >React Router: hashHistory vs browserHistory - Egghead.io
In this lesson we'll look at hashHistory which uses a hash hack to track our route changes vs browserHistory which delivers clean urls,...
Read more >Histories · React Router
browserHistory uses the HTML5 History API when available, and falls back to ... hashHistory uses URL hashes, along with a query key to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for pointing this out.
There is now a
createHistory
option which you can pass the hash history to or your own fork/implementation etc. Eg:Otherwise, for anyone reading this, if you’re not passing your own
createHistory
factory, RFR will automatically pick the memory or browser history automatically for you based on the environment it detects. I.e. on the server or React Native it will pickcreateMemoryHistory
and if in the browser it will pickcreateBrowserHistory
😃@faceyspacey I’m using the hash history because I’m deploying a single page app (with no SSR) while I have no control on the hosting server.