When using a custom reducer to replace the current navigation state (using NavigationStateUtils.replaceAt) the renderOverlay function receives the wrong scene. This is because a new scene was created in the scene reducer and the previous one set to isStale=true. renderOverlay gets scenes[navigationState.index] as the scene prop.
But I don't think having this stale scene around is right in this case. For me it's not that big of an issue, because I realized I don't really need the scene in renderOverlay, but keeping a stale scene around that is not involved in any animations seems a bit wasteful.
When using a custom reducer to replace the current navigation state (using NavigationStateUtils.replaceAt) the renderOverlay function receives the wrong scene. This is because a new scene was created in the scene reducer and the previous one set to isStale=true. renderOverlay gets scenes[navigationState.index] as the scene prop.
Fixing it would be quite easy:
But I don't think having this stale scene around is right in this case. For me it's not that big of an issue, because I realized I don't really need the scene in renderOverlay, but keeping a stale scene around that is not involved in any animations seems a bit wasteful.