Class: Context<T>
Defined in: src/sdk/components/FSComponent.ts:177
Provides a context of data that can be passed down to child components via a provider.
Type Parameters
| Type Parameter |
|---|
T |
Constructors
Constructor
new Context<
T>(defaultValue):Context<T>
Defined in: src/sdk/components/FSComponent.ts:189
Creates an instance of a Context.
Parameters
| Parameter | Type | Description |
|---|---|---|
defaultValue | T | The default value of this context. |
Returns
Context<T>
Properties
defaultValue
readonlydefaultValue:T
Defined in: src/sdk/components/FSComponent.ts:189
The default value of this context.
Methods
Provider()
readonlyProvider(props):ContextProvider<T>
Defined in: src/sdk/components/FSComponent.ts:183
The provider component that can be set to a specific context value.
Parameters
| Parameter | Type | Description |
|---|---|---|
props | ContextProviderProps<T> | The props of the provider component. |
Returns
ContextProvider<T>
A new context provider.