|
@@ -6,12 +6,12 @@ import { ComponentEventsObserver } from '../events/ComponentEventsObserver';
|
6
|
6
|
export class ComponentRegistry {
|
7
|
7
|
constructor(private readonly store: Store, private readonly componentEventsObserver: ComponentEventsObserver, private readonly ComponentWrapperClass: typeof ComponentWrapper) { }
|
8
|
8
|
|
9
|
|
- registerComponent(componentName: string, getComponentClassFunc: ComponentProvider, ReduxProvider?: any, reduxStore?: any): ComponentProvider {
|
|
9
|
+ registerComponent(componentName: string | number, getComponentClassFunc: ComponentProvider, ReduxProvider?: any, reduxStore?: any): ComponentProvider {
|
10
|
10
|
const NavigationComponent = () => {
|
11
|
|
- return this.ComponentWrapperClass.wrap(componentName, getComponentClassFunc, this.store, this.componentEventsObserver, ReduxProvider, reduxStore)
|
|
11
|
+ return this.ComponentWrapperClass.wrap(componentName.toString(), getComponentClassFunc, this.store, this.componentEventsObserver, ReduxProvider, reduxStore)
|
12
|
12
|
};
|
13
|
|
- this.store.setComponentClassForName(componentName, NavigationComponent);
|
14
|
|
- AppRegistry.registerComponent(componentName, NavigationComponent);
|
|
13
|
+ this.store.setComponentClassForName(componentName.toString(), NavigationComponent);
|
|
14
|
+ AppRegistry.registerComponent(componentName.toString(), NavigationComponent);
|
15
|
15
|
return NavigationComponent;
|
16
|
16
|
}
|
17
|
17
|
}
|