Hash Routing not working with new tab/window #268
Replies: 2 comments 1 reply
-
We have the same problem on our project. Furthermore we have another issue. If you change the Should we open an issue? |
Beta Was this translation helpful? Give feedback.
-
There are also a few other issues and discussions mentioning this. #600, #300, #561 (a PR), #542, #457. FWIW, the reason hashes are important (other than sometimes maybe you just feel like using them) is that they aren't included in the page request by the browser. For example you could have a secure sharing link with both a resource identifier portion and a decryption key portion. The key would be in the hash and would never be sent across the wire (only used client-side). |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have problems with Hash Routing and Links, when they open in a new tab or window.
I modified the basic routing example and enable hash routing:
https://codesandbox.io/s/react-location-basic-with-hash-fr7v18?file=/src/index.tsx
If you click the links everything works normally. But if you open one of the links in a new tab or new window, the hash is missing and you end up on the home page.
Am I doing something wrong? Do I have to add the hash manually to the links? I try to add 'activeOptions={{ includeHash: true }}' to the 'posts' link, but this nothing change. Or is that possibly an issue with hash routing?
Thx for help
Beta Was this translation helpful? Give feedback.
All reactions