lastState.children.forEach((child, index) => { if (!NavigationStateUtils.get(nextState, child.key)) { nextScenes.push({ index, state: child, isStale: true, }); } });
it('can get children', () => { var fooState = {key: 'foo'}; var navState = {children: [{key: 'foobar'}, fooState], index: 0}; expect(NavigationState.get(navState, 'foo')).toBe(fooState); expect(NavigationState.get(navState, 'missing')).toBe(null); });