Skip to main content

create_context

Create a context provider.

Parameters:

  • default_value (T) - Default context value when no provider is found.

Returns:

  • 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.