Associates an arbitrary context object with the current component and the specified key
and returns that object. The context is then available to children of the component
(including slotted content) with getContext.
Like lifecycle functions, this must be called during component initialisation.
Associates an arbitrary
context
object with the current component and the specifiedkey
and returns that object. The context is then available to children of the component (including slotted content) withgetContext
.Like lifecycle functions, this must be called during component initialisation.
https://svelte.dev/docs/svelte#setcontext