UIElement Docs Version 0.13.3

🔗 Function: provideContexts()

provideContexts<P, K>(contexts): (host) => Cleanup

Defined in: src/core/context.ts:98

Provide a context for descendant component consumers

🔗 Type Parameters

🔗 P

P extends ComponentProps

🔗 K

K extends string | number | symbol

🔗 Parameters

🔗 contexts

Context<K, Signal<P[K]>>[]

array of contexts to provide

🔗 Returns

  • function to add an event listener for ContextRequestEvent returning a cleanup function to remove the event listener

(host): Cleanup

🔗 Parameters

🔗 host

Component<P>

🔗 Returns

Cleanup

🔗 Since

0.13.3