Interface: IComponent<S>
Type parameters
Name | Type |
---|---|
S | any |
Implemented by
Methods
forceUpdate
▸ forceUpdate(): void
Force to update the Component
Returns
void
Defined in
getState
▸ getState(): S
Get the Component state
Returns
S
Defined in
onUpdateState
▸ onUpdateState(callback
): void
Listen to the Component state update event
Parameters
Name | Type |
---|---|
callback | (prevState : S , nextState : S ) => void |
Returns
void
Defined in
removeOnUpdateState
▸ removeOnUpdateState(): void
Remove the Component update event listening
Returns
void
Defined in
render
▸ render(nextState?
): void
Trigger the Component update event
Parameters
Name | Type |
---|---|
nextState? | S |
Returns
void
Defined in
setState
▸ setState(values
, callback?
): void
Set the Component state
Parameters
Name | Type | Description |
---|---|---|
values | S | The next values of state |
callback? | (prevState : S , nextState : S ) => void | calling after setState |
Returns
void