Table of Contents

Method Create

Namespace
Velvet
Assembly
Velvet.Docs.dll

Create(T?)

Creates a context with the given default value.

public static ComponentContext<T> Create(T? defaultValue = default)

Parameters

defaultValue T

Value returned by UseContext when no Provider is configured above the consumer.

Returns

ComponentContext<T>

The created ComponentContext<T>.