File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 1
- import { useCallback , useDebugValue , useRef } from 'react'
1
+ import React , { useCallback , useDebugValue , useRef } from 'react'
2
2
3
3
import {
4
4
createReduxContextHook ,
5
5
useReduxContext as useDefaultReduxContext ,
6
6
} from './useReduxContext'
7
- import { ReactReduxContext } from '../components/Context'
7
+ import {
8
+ ReactReduxContext ,
9
+ ReactReduxContextValue ,
10
+ } from '../components/Context'
8
11
import type { EqualityFn , NoInfer } from '../types'
9
12
import type { uSESWS } from '../utils/useSyncExternalStore'
10
13
import { notInitialized } from '../utils/useSyncExternalStore'
14
+ import { Action , UnknownAction } from 'redux'
11
15
12
16
export type CheckFrequency = 'never' | 'once' | 'always'
13
17
@@ -41,7 +45,9 @@ const refEquality: EqualityFn<any> = (a, b) => a === b
41
45
* @param {React.Context } [context=ReactReduxContext] Context passed to your `<Provider>`.
42
46
* @returns {Function } A `useSelector` hook bound to the specified context.
43
47
*/
44
- export function createSelectorHook ( context = ReactReduxContext ) : UseSelector {
48
+ export function createSelectorHook (
49
+ context : React . Context < ReactReduxContextValue < any , any > > = ReactReduxContext
50
+ ) : UseSelector {
45
51
const useReduxContext =
46
52
context === ReactReduxContext
47
53
? useDefaultReduxContext
You can’t perform that action at this time.
0 commit comments