When I use HashRouter from react-router-dom in my React application, the calculation of the URL doesn't seem to correct. For example, If I'm on https://localhost/#/foo/bar and I click a tab on that page, I expect the URL to change to this, https://localhost/#/foo/bar#tab. However, the plugin changes the URL to something like https://localhost#tab so I've lost /#/foo/bar from the URL. Then, using the back and forward buttons to navigate won't work correctly.
When I use HashRouter from react-router-dom in my React application, the calculation of the URL doesn't seem to correct. For example, If I'm on
https://localhost/#/foo/bar
and I click a tab on that page, I expect the URL to change to this,https://localhost/#/foo/bar#tab
. However, the plugin changes the URL to something likehttps://localhost#tab
so I've lost/#/foo/bar
from the URL. Then, using the back and forward buttons to navigate won't work correctly.