Skip to main content

context_for_plugin

Function context_for_plugin 

Source
pub fn context_for_plugin<S: Clone + 'static>(state: S) -> Context<S>
Expand description

Convenience: provides a plugin’s state to a subtree as a Context so descendant components can read it.

Returns the Context so callers can keep a handle for updates. Wrap the builder closure in provide_context so the context is scoped to scope.