Function dioxus_hooks::use_context_provider
source · pub fn use_context_provider<T: 'static + Clone>(
cx: &ScopeState,
f: impl FnOnce() -> T
) -> &T
Expand description
Provide some context via the tree and return a reference to it
Once the context has been provided, it is immutable. Mutations should be done via interior mutability.