Skip to content

create_context

create_context #

create_context(default_value: T) -> ContextProvider[T]

Create a context provider.

PARAMETER DESCRIPTION
default_value

Default context value when no provider is found.

TYPE: T

RETURNS DESCRIPTION
ContextProvider[T]

A context provider that can be used with use_context and to wrap parts of the component tree that should share the same context value.