Table of Contents

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

T

Type of the value carried by the context.

Inheritance
object
ComponentContext<T>

Properties

DefaultValue

Value returned by UseContext when no Provider for this context exists above the consumer.

Methods

Create(T?)

Creates a context with the given default value.