|
@@ -1,3 +1,4 @@
|
|
1
|
+import * as React from 'react';
|
1
|
2
|
import { AppRegistry, ComponentProvider } from 'react-native';
|
2
|
3
|
import { ComponentWrapper } from './ComponentWrapper';
|
3
|
4
|
|
|
@@ -8,10 +9,11 @@ export class ComponentRegistry {
|
8
|
9
|
this.store = store;
|
9
|
10
|
}
|
10
|
11
|
|
11
|
|
- registerComponent(componentName: string, getComponentClassFunc: ComponentProvider) {
|
|
12
|
+ registerComponent(componentName: string, getComponentClassFunc: ComponentProvider): React.ComponentType<any> {
|
12
|
13
|
const OriginalComponentClass = getComponentClassFunc();
|
13
|
14
|
const NavigationComponent = ComponentWrapper.wrap(componentName, OriginalComponentClass, this.store);
|
14
|
15
|
this.store.setOriginalComponentClassForName(componentName, OriginalComponentClass);
|
15
|
16
|
AppRegistry.registerComponent(componentName, () => NavigationComponent);
|
|
17
|
+ return NavigationComponent;
|
16
|
18
|
}
|
17
|
19
|
}
|