useScoped
Overview
Type: Function
A React hook to consume a scoped State Manager. To be used together with StateManagerScopeProvider
. However, if the component consuming this hook is not wrapped in one, then the returned State Manager will fall back to the "unscoped" one.
const scopedStateManager = useScoped(stateManager)
Parameters
stateManager
— The State Manager that will be scoped.
Type:SimpleStateManager
,StateManager
orAsyncStateManager
Required: Yes