useStateWithUpdater<T> method

(T, StateSetter<T>) useStateWithUpdater<T>(
  1. T initial
)

Reads state with a setter that also accepts functional updates.

Implementation

(T, StateSetter<T>) useStateWithUpdater<T>(T initial) =>
    unsupportedReactFeature('useState (functional updates)');