Skip to content

Component properties

Filatov Dmitry edited this page Feb 10, 2017 · 3 revisions

Instance properties

All of instance's properties are readonly and mustn't be modified directly.

attrs

Object attrs

Represents the current attrs of the component's instance.

children

Any children

Represents the current children of the component's instance.

state

Object state

Represents the current state of the component's instance. State can be modified via setState method.

context

Object context

Represents the current context of the component's instance.

Static properties

defaultAttrs

Object defaultAttrs

Represents the default attrs of the component. They should be specified during component's class declaration.

class Button extends Component {
    ...
}

Button.defaultAttrs = {
    text : 'click me'
};