🔗 Function: fromContext()
fromContext<
T,C>(context,fallback):Extractor<Signal<T>,C>
Defined in: src/core/context.ts:125
Consume a context value for a component.
🔗 Type Parameters
🔗 T
T extends object
🔗 C
C extends HTMLElement = HTMLElement
🔗 Parameters
🔗 context
Context key to consume
🔗 fallback
Fallback<T, C>
Fallback value or extractor function
🔗 Returns
Function that returns the consumed context signal or a signal of the fallback value
🔗 Since
0.13.1