( config: ComponentConfig )
| 84 | }; |
| 85 | |
| 86 | export function registerComponent<Props>( |
| 87 | config: ComponentConfig |
| 88 | ): ReactNodeGuiTag<Props> { |
| 89 | if (components.has(config.tagName)) { |
| 90 | throw `A component with tagName: ${config.tagName} already exists. This base component will be ignored`; |
| 91 | } |
| 92 | components.set(config.tagName, config); |
| 93 | return config.tagName; |
| 94 | } |