-
Notifications
You must be signed in to change notification settings - Fork 16
Component methods
Filatov Dmitry edited this page Aug 1, 2016
·
14 revisions
Object getState()
Returns the current state.
void setState(
Object state
)
Updates the current state and schedules rerender of a component. The given state will be merged with the current state.
Object getPrevState()
Returns the previous state. It may be used within shouldUpdate
lifecycle method to calculate difference with the current state.
Object getAttrs()
Returns the current attributes.
Object getContext()
Returns the current context.
Node getDomRef(
String ref
)
Returns the DOM element by the given reference.
VNode setDomRef(
String ref,
VNode node
)
Sets a named reference to the given DOM element.
Boolean isMounted()
Returns whether a component is mounted to the DOM.
void update(
[Function cb]
)
Schedules rerender of a component.