history.pushstate and history.replacestate have 3 parameters. and the third parameter is URL, which is optional.
https://html.spec.whatwg.org/multipage/history.html#dom-history-pushstate
so even if we use window.history.pushState({}, '') - events single-spa:before-routing-event and single-spa:routing-event will be fired and method isActive of every registered app will be run;
our case: we use https://github.com/mapbox/scroll-restorer in our service https://github.com/namecheap/ilc. and scroll-restorer saves scroll position in the state of history. it's important if we use back/forward buttons in a browser. so every time when a user just scrolls page - it uses pushstate and in result - single-spa think that route is changed.
https://github.com/single-spa/single-spa/blob/108292928d225e1fd7c80245f2d6d6128edd4ee5/src/navigation/navigation-events.js#L124`
history.pushstateandhistory.replacestatehave 3 parameters. and the third parameter is URL, which is optional.https://html.spec.whatwg.org/multipage/history.html#dom-history-pushstate
so even if we use
window.history.pushState({}, '')- eventssingle-spa:before-routing-eventandsingle-spa:routing-eventwill be fired and methodisActiveof every registered app will be run;our case: we use https://github.com/mapbox/scroll-restorer in our service https://github.com/namecheap/ilc. and scroll-restorer saves scroll position in the state of history. it's important if we use back/forward buttons in a browser. so every time when a user just scrolls page - it uses pushstate and in result - single-spa think that route is changed.
https://github.com/single-spa/single-spa/blob/108292928d225e1fd7c80245f2d6d6128edd4ee5/src/navigation/navigation-events.js#L124`