context
wybthon.context¶
Tiny context system for passing values through the component tree.
Context
dataclass
¶
Opaque context identifier and default value container.
Provider
¶
create_context(default)
¶
Create a new Context with a unique identifier and default value.
pop_provider_value()
¶
Pop the latest provider scope from the context stack if present.
push_provider_value(ctx, value)
¶
Push a new provider value for ctx onto the context stack.
use_context(ctx)
¶
Read the current value for ctx, or its default if not provided.