useActionState<T, A> function

(T, void Function(A)) useActionState<T, A>(
  1. Action<T, A> action,
  2. T initialState, [
  3. String? permalink
])

Returns action state and a dispatcher for async actions.

Requires a React 19 or newer runtime that exports useActionState. Calling this hook with an older runtime throws UnsupportedError.

See https://react.dev/reference/react/useActionState.

Implementation

(T, void Function(A)) useActionState<T, A>(
  Action<T, A> action,
  T initialState, [
  String? permalink,
]) =>
    currentReactRuntime.binding.useActionState(action, initialState, permalink);