Appearance
@shtse8/fluxus / src / Provider
Type Alias: Provider()<T>
Provider<
T> = (reader) =>T
Defined in: src/types.ts:153
The core building block of Fluxus. A Provider defines how to create a value within a specific scope. Providers are functions or objects that encapsulate state creation logic.
Providers are typically created using factory functions like stateProvider, computedProvider, etc.
They are identified by object identity, meaning you don't register them with strings; you use the provider function/object itself as the key.
Type Parameters
T
T
The type of the value created by the provider.
Parameters
reader
A ScopeReader instance to interact with the scope.
Returns
T
The created value of type T.