Home Reference Source
public class | source

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:

NameTypeAttributeDescription
props *

Public Members

public state: * source

Public Methods

public componentWillMount() source

public componentWillUnmount() source

public onAdd(id: *, component: *, callback: *) source

Params:

NameTypeAttributeDescription
id *
component *
callback *

public onRemove(id: *) source

Params:

NameTypeAttributeDescription
id *

public render(): * source

Return:

*