RootExtension
Extends:
react~React.Component → RootExtension
The idea here is you generate a unique ID and a component then emit an addRootComponent event with the id and component and it is injected here.
It's really quite hacky but it works. Something like:
const myComponent = <SomeThing />;
events.emit('addRootComponent', myId, myComponent);
// then to remove
events.emit('removeRootComponent', myId);
Constructor Summary
| Public Constructor | ||
| public |
constructor(props: *) |
|
Member Summary
| Public Members | ||
| public |
state: * |
|
Method Summary
| Public Methods | ||
| public |
|
|
| public |
|
|
| public |
onAdd(id: *, component: *, callback: *) |
|
| public |
onRemove(id: *) |
|
| public |
render(): * |
|
Public Constructors
public constructor(props: *) source
Params:
| Name | Type | Attribute | Description |
| props | * |