Skip to content
Filatov Dmitry edited this page Aug 1, 2016 · 14 revisions

getState

Object getState()

Returns the current state.

setState

void setState(
    Object state
)

Updates the current state and schedules rerender of a component. The given state will be merged with the current state.

getPrevState

Object getPrevState()

Returns the previous state. It may be used within shouldUpdate lifecycle method to calculate difference with the current state.

getAttrs

Object getAttrs()

Returns the current attributes.

getContext

Object getContext()

Returns the current context.

getDomRef

Node getDomRef(
    String ref
)

Returns the DOM element by the given reference.

setDomRef

VNode setDomRef(
    String ref,
    VNode node
)

Sets a named reference to the given DOM element.

isMounted

Boolean isMounted()

Returns whether a component is mounted to the DOM.

update

void update(
    [Function cb]
)

Schedules rerender of a component.