Skip to content

use_context

use_context #

use_context(context: ContextProvider[T]) -> T

Access the current context value.

PARAMETER DESCRIPTION
context

A context provider created by create_context.

TYPE: ContextProvider[T]

RETURNS DESCRIPTION
T

The current context value, or the default value if no provider is found.