Skip to main content

use_provide_root_context

Function use_provide_root_context 

Source
pub fn use_provide_root_context<T: Clone + 'static>(
    init: impl FnOnce() -> T,
) -> T
Expand description

Store the given value in the root scope.

Only needed for specific cases like values consumed by queries or mutations, which run in the root scope. Prefer use_provide_context otherwise.