Skip to content

@shtse8/fluxus v1.0.0


@shtse8/fluxus / src / StateUpdater

Type Alias: StateUpdater()<T>

StateUpdater<T> = (scope, provider, newValue) => void

Defined in: src/providers/stateProvider.ts:16

Defines the shape of the function used to update the state of a StateProviderInstance. This function is retrieved via scope.updater(provider).

Type Parameters

T

T

The type of the state.

Parameters

scope

Scope

The scope instance in which the update occurs.

provider

StateProviderInstance<T>

The specific provider instance being updated.

newValue

T | (prev) => T

Returns

void

Released under the ISC License.