Interface InlineHandler<T>

When passed to a Dispatcher this function will be invoked so state can be updated.

Returns

A tuple, the first element is an object of type T. The optional second element indicates if the state has changed; if not provided it defaults to false.

interface InlineHandler<T> ((state) => [state: T, changed?: boolean])

Type Parameters

  • T = unknown

    The type of the state parameter and first element in the return tuple.

  • Parameters

    • state: T

    Returns [state: T, changed?: boolean]