Context APIs
Radiant context lets related hosts share state without manually threading props through every intermediate layer.
The core pieces are:
Choosing The Right Tool
- Use @provideContext when a host owns shared state for descendants.
- Use @consumeContext when the host needs the provider object itself.
- Use @contextSelector when a field should stay in sync with a value or selected slice.
- Use @onContextUpdate when context changes should trigger imperative work.
Host Support
These context decorators now work on both RadiantElement and RadiantController.
Use RadiantElement when the provider or consumer is a custom element. Use RadiantController when the same context logic should attach to existing DOM.