You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With HTML5 History API, the user agent fires a popstate event when the user navigates through their history, whether backwards or forwards, provided it isn’t taking the user away from the current page: http://html5doctor.com/history-api/#historical-events
As far as I understand it, this means that when using hash history - createHashHistory(), both a PUSH and a POP emitted.
@cycle/history also emits both of these events. You can see this by adding a debug to history$ in RouterSource, e.g. on line 39 of RouterSource.ts (when using the hash history).
However I believe it should be up to cyclic-router to filter out the POPs. The unfortunate consequence of getting both events is that components are rendered twice on every route change (when using hash history).
With HTML5 History API, the user agent fires a
popstate
event when the user navigates through their history, whether backwards or forwards, provided it isn’t taking the user away from the current page:http://html5doctor.com/history-api/#historical-events
As far as I understand it, this means that when using hash history -
createHashHistory()
, both a PUSH and a POP emitted.@cycle/history
also emits both of these events. You can see this by adding a debug tohistory$
in RouterSource, e.g. on line 39 ofRouterSource.ts
(when using the hash history).However I believe it should be up to
cyclic-router
to filter out the POPs. The unfortunate consequence of getting both events is that components are rendered twice on every route change (when using hash history).What do you think @TylorS?
The text was updated successfully, but these errors were encountered: