Class ComponentContext<T>
- Namespace
- Velvet
- Assembly
- Velvet.Docs.dll
Typed context definition that lets a value be supplied by an ancestor Provider and read by
any descendant via UseContext.
Holds the default value returned when no Provider is configured.
public sealed class ComponentContext<T>
Type Parameters
TType of the value carried by the context.
- Inheritance
-
objectComponentContext<T>
Properties
- DefaultValue
Value returned by
UseContextwhen no Provider for this context exists above the consumer.
Methods
- Create(T?)
Creates a context with the given default value.