Closed RakeshPawar closed 8 months ago
React Router uses history.pushState
/history.replaceState
under the hood for push/replace navigations which don't trigger hashchange
events. Your best best to synchronize across these sub-apps is probably to use an effect to fire a custom event on useLocation
changes
What version of React Router are you using?
6.20.0
Steps to Reproduce
I am new to react router , would appreciate some help here.
sandbox link Background-
I am working on vite+ react app as shell in micro-frontend , child micro-frontends also has its own routing and I am using 'hashchange' event to sync them together.
Expected Behavior
Should raise 'hashchange' event?
Actual Behavior
no event is raised. Event is raised if I use back or navigate(-1)