suspense-service

suspense-service / Exports / createStateContext

Function: createStateContext

createStateContext<T>(defaultValue: T): StateContext<T>

Creates a State Context for providing a stateful value and a function to update it.

Type parameters:

Name
T

Parameters:

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