setStateWithUpdater method

void setStateWithUpdater(
  1. StateUpdaterCallback updater, [
  2. SetStateCallback? callback
])
inherited

Triggers a rerender with new state obtained by shallow-merging the return value of updater into the current state.

Optionally accepts a callback that gets called after the component updates.

See: reactjs.org/docs/react-component.html#setstate

Implementation

void setStateWithUpdater(StateUpdaterCallback updater, [SetStateCallback? callback]) {
  _bridge.setStateWithUpdater(this, updater, callback);
}