suspense-service / Exports / createStateContext
▸ createStateContext<T>(defaultValue
: T): StateContext<T>
Creates a State Context for providing a stateful value and a function to update it.
Name |
---|
T |
Name | Type | Description |
---|---|---|
defaultValue |
T | the value consumed if no StateContextProvider is in scope and the consumer id is null |
Returns: StateContext<T>
Defined in: StateContext/index.ts:30