mirror of
https://github.com/status-im/react-navigation.git
synced 2025-02-25 01:28:16 +00:00
Fix withCachedChildNavigation recreating the child navigations each time (#201)
This commit is contained in:
parent
33767311ae
commit
fa826bfe17
@ -42,7 +42,9 @@ export default function withCachedChildNavigation<T: Props>(Comp: ReactClass<T>)
|
||||
navigation: NavigationScreenProp<NavigationState, NavigationAction>
|
||||
) => {
|
||||
// Update props for each child route
|
||||
this._childNavigationProps = {};
|
||||
if (!this._childNavigationProps) {
|
||||
this._childNavigationProps = {};
|
||||
}
|
||||
navigation.state.routes.forEach((route: *) => {
|
||||
const childNavigation = this._childNavigationProps[route.key];
|
||||
if (childNavigation && childNavigation.state === route) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user