pub fn use_context<T: 'static>(cx: Scope<'_>) -> &T
Expand description

Gets a context value of the given type.

Panics

This method panics if the context cannot be found in the current scope hierarchy. For a non-panicking version, see try_use_context.