The popstate event did not however capture the full scope of the kind of url changes that should trigger a page reload.
Fix
Use window.location.href to determine when to trigger a reload. This change ensures that any change in the url (path name, query params and hash) will cause a reload.
Description of the Problem
Previously, it was possible to listen to changes in the browser url using
After migrating to v6 of react router DOM,
history.listen
was not usable since it had been removed. In replacement, the following approach was takenThe
popstate
event did not however capture the full scope of the kind of url changes that should trigger a page reload.Fix
Use
window.location.href
to determine when to trigger a reload. This change ensures that any change in the url (path name, query params and hash) will cause a reload.Closes https://github.com/InetIntel/ioda-ui/issues/146