The API reference is a Work in Progress and will be continuously improved and extended. We'd love to hear your feedback in our documentation repository.

Home > @edtr-io/core > useScopedDispatch

useScopedDispatch() function

React Hook to dispatch an action in the current scope

Signature:
export declare function useScopedDispatch(
  enforcedScope?: string
): (scopedAction: (scope: string) => Action) => void

Parameters

ParameterTypeDescription
enforcedScopestringIf provided, used as the scope instead of the current scope
Returns:

(scopedAction: (scope: string) => Action) => void