Or maybe I'm misunderstanding what's supposed to happen.
Let's say my initial navigation state is
{ key: 'root', index: 0, children: [ { key: 'home' } ] }
and then I replace it with
{ key: 'root', index: 0, children: [ { key: 'settings' } ] }
As far as I can tell, NavigationScenesReducer, via NavigationAnimatedView, will keep rendering both settings and home, and since they both have the same index, compareScenes ends up sorting by alpha. Should isStale be part of compareScenes?
(Also, to be honest, I don't totally understand why stale scenes are part of the result returned by NavigationScenesReducer, it'd be great to have some more comments in the code to explain why it works this way.)
Or maybe I'm misunderstanding what's supposed to happen.
Let's say my initial navigation state is
{ key: 'root', index: 0, children: [ { key: 'home' } ] }
and then I replace it with
{ key: 'root', index: 0, children: [ { key: 'settings' } ] }
As far as I can tell, NavigationScenesReducer, via NavigationAnimatedView, will keep rendering both settings and home, and since they both have the same index, compareScenes ends up sorting by alpha. Should isStale be part of compareScenes?
(Also, to be honest, I don't totally understand why stale scenes are part of the result returned by NavigationScenesReducer, it'd be great to have some more comments in the code to explain why it works this way.)