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 > useScopedStore
useScopedStore() function
React Hook to obtain a reference to the scoped store
Signature:export declare function useScopedStore(
enforcedScope?: string
): {
dispatch: (scopedAction: (scope: string) => Action) => void
getState: () => ScopedState
subscribe: (listener: () => void) => Unsubscribe
}
Parameters
Parameter | Type | Description |
---|---|---|
enforcedScope | string | If provided, used as the scope instead of the current scope |
{ dispatch: (scopedAction: (scope: string) => Action) => void; getState: () => ScopedState; subscribe: (listener: () => void) => Unsubscribe; }
The scoped store