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 > useScopedSelector
useScopedSelector() function
React Hook to get the value of an selector in the current scope
Signature:export declare function useScopedSelector<T>(
scopedSelector: (state: ScopedState) => T,
enforcedScope?: string
): T
Parameters
Parameter | Type | Description |
---|---|---|
scopedSelector | (state: ScopedState) => T | The selector |
enforcedScope | string | If provided, used as the scope instead of the current scope |
T
The value of the selector in the current scope