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
{{ message }}
This repository was archived by the owner on Oct 26, 2018. It is now read-only.
On first page render, if redux DebugPanel is displayed, the simple router calls history.pushState with the existing route. This means that Router.createElement is invoked twice on ReactRouter - which isn't necessary.
The redux DevTools or perhaps LogMonitor seems to trigger the store.subrscribe callback on an interval. Here, RSR is finding that lastChangeId !== routing.changeId; and so calling the new pushState.
It could be worth caching the routePath and checking for a difference with the current getState().routing.path before invoking updatePath, but of course, that wouldn't take into account any route state changes.
It may be more simple to initialise the lastChangeId to the same value as initialState.changeId - again, there's probably a use case in here somewhere that route.state updates on initial render wouldn't be taken into account...
Perhaps #50 could prevent the unnecessary pushState call on initial render.
The text was updated successfully, but these errors were encountered:
We cannot diff paths, that's what we used to do and it is not reliable at all. In fact we want to call into the router for every single URL change -- even if it's the same URL!
But I think you might be right about initializing the lastChangeId. Let's merge this with #50.
On first page render, if redux DebugPanel is displayed, the simple router calls history.pushState with the existing route. This means that Router.createElement is invoked twice on ReactRouter - which isn't necessary.
The redux DevTools or perhaps LogMonitor seems to trigger the store.subrscribe callback on an interval. Here, RSR is finding that
lastChangeId !== routing.changeId;
and so calling the new pushState.It could be worth caching the
routePath
and checking for a difference with the currentgetState().routing.path
before invokingupdatePath
, but of course, that wouldn't take into account any route state changes.It may be more simple to initialise the
lastChangeId
to the same value asinitialState.changeId
- again, there's probably a use case in here somewhere that route.state updates on initial render wouldn't be taken into account...Perhaps #50 could prevent the unnecessary pushState call on initial render.
The text was updated successfully, but these errors were encountered: