4 ms·
I don't think there's anything about the standard history APIs that causes conflicts between history and url hash use. I don't really know how widely used clie
by recursive 3y ago
I don't think there's anything about the standard history APIs that causes conflicts between history and url hash use. I don't really know how widely used client routers work, but this really sounds like a trivial fix. I'm probably missing something.
- no_wizard 3y agothere isn't, as far I know, its simply that most client routers require you to make a choice: either use hash routing, or use history API. They don't have any built-in conveinences for using both together (namely, around things like getting URL parameters) React Router, Vue Router etc. None of them have any consideration for using them together, they either don't support it at all or make you choose.
- mhio 3y agoI don't follow, Why would hash based routing not use the history API? I'm aware of the choice between path based routing, and hash based routing, which has some server side implications. The History API manages entries in the client history, which I always thought a hash based router would still need to use. Maybe because a hash based router can work single page on the client without having to fake real resource paths? edit: I'm only familiar with the vue side, but vue-router relies on the same code for both, I can only see minimal differences for the `#`, not much for the history management. https://github.com/vuejs/router/blob/110c86929ac92e2428d8d4958b6c6374754bc0df/packages/router/src/history/hash.ts#L45 https://github.com/vuejs/router/blob/110c86929ac92e2428d8d49...
- no_wizard 3y agoIt’s more about the convenience features and melding of the two methods not so much that the underlying API prevents them from working together. Vue router doesn’t have a mixed mode for instance