Skip to main content

context_provider

Function context_provider 

Source
pub fn context_provider<T>(
    value: T,
    content: impl IntoElementContent + 'static,
) -> Element
where T: Clone + PartialEq + 'static,
Expand description

Provides a typed context value while its declarative descendants are compiled.

The provider is itself a retained component boundary. This keeps the provider stack active for lazily compiled child components and gives context dependency tracking a stable owner independent of the rendering backend.