73c5360470
Summary: With nested NavigatorIOS components: ``` <NavigatorIOS initialRoute={{ component: ComponentWithAnotherNavigatorIOSInSubtree title: 'xyz' }}> ``` Navigating (via push etc.) in ComponentWithAnotherNavigatorIOSInSubtree's `navigator` caused an invariant error, making apps with this structure unusable. The reason was that the `navigationComplete` nativeEvent was being propagated to the outer Navigator due to React's automatic event bubbling, making the outer NavigatorIOS incorrectly think it was holding navigation stack state inconsistent with its native UINavigationController. Concretely, if the outer navigation stack is empty except for its initial state and something is pushed onto the inner stack, the outer NavigatorIOS suddenly complains that it has 2 items on its stack rather than 1. In reality, the outer Navigator still only has 1 item on its stack but the inner Navigator's event (containing information about the inner Navigator) incorrectly bubbles up and reaches the outer Navigator too. Closes https://github.com/facebook/react-native/pull/9828 Differential Revision: D4030167 Pulled By: ericvicenti fbshipit-source-id: d04de3d5b70b4862a78610c92701ebdab2b047dd |
||
---|---|---|
.. | ||
NavigatorIOS.android.js | ||
NavigatorIOS.ios.js |