suspense-service / Exports / useStateContext
▸ useStateContext<T>(context: StateContext<T>, id?: Id): State<T>
Consumes a stateful value from a StateContextProvider, and a function to update it
| Name |
|---|
T |
| Name | Type | Description |
|---|---|---|
context |
StateContext<T> | the StateContext to use |
id? |
Id | the StateContextProvider id to use |
Returns: State<T>
Defined in: StateContext/index.ts:47