Component
Class for a component.
class HelloWorldComponent extends Component {
render() {
return (
<h1>{this.props.message}</h1>
);
}
}
renderToDom('container', <HelloWorldComponent messsage="Hello World!"/>);
Static Member Summary
Static Public Members | ||
public static |
isComponent: * |
Constructor Summary
Public Constructor | ||
public |
constructor(props: Object, store: Store) Constructor of a component. |
Member Summary
Public Members | ||
public |
|
|
public |
node: Node Parent node of the component. |
|
public |
otherRef: * |
|
public |
The props (attributes pass to dom node + children). |
|
public get |
The state of the current store |
|
public |
The store share between all components. |
Method Summary
Public Methods | ||
public abstract |
Method called after rendered into DOM. |
|
public |
Method to implement to react when an event that does not imply re rendering is sent to Store |
|
public |
Method to implement to react when an event is send to Store |
|
public |
mustRefresh(oldState: Object, newState: Object): boolean Return false to avoid call to render on an event. |
|
public |
nodeRefHandler(node: Node) Do not touch :) |
|
public |
Method to implement called when an event that does not imply re rendering is sent to Store |
|
public |
reactToChangeState(event: string, newState: Object, oldState: Object) Internally method which is called when an event of eventsToSubscribe You can override the method if you want a specific |
|
public |
refresh() Method to call to refresh the component without the use of the store. |
|
public abstract |
Method to implement to render something. |
|
public |
renderComponent(otherRef: *): Component | Object Method use internally to render a component. |
Static Public Members
public static isComponent: * source
Public Constructors
Public Methods
public eventsToReact(): Array source
Method to implement to react when an event that does not imply re rendering is sent to Store
public eventsToSubscribe(): Array source
Method to implement to react when an event is send to Store
public mustRefresh(oldState: Object, newState: Object): boolean source
Return false to avoid call to render on an event.
public nodeRefHandler(node: Node) source
Do not touch :)
Params:
Name | Type | Attribute | Description |
node | Node | parent node of the component. |
public react(event: String) source
Method to implement called when an event that does not imply re rendering is sent to Store
Params:
Name | Type | Attribute | Description |
event | String | to react on |
public reactToChangeState(event: string, newState: Object, oldState: Object) source
Internally method which is called when an event of eventsToSubscribe You can override the method if you want a specific
public refresh() source
Method to call to refresh the component without the use of the store. Useful for internal state with this.