-
Notifications
You must be signed in to change notification settings - Fork 16
Component methods
Filatov Dmitry edited this page Jan 2, 2017
·
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.
Any getChildren()
Returns the current children.
Object getContext()
Returns the current context.
Boolean isMounted()
Returns whether a component is mounted to the DOM.
void update(
[Function cb]
)
Schedules rerender of a component.