Skip to content

Commit a51296f

Browse files
thiskevinwangtimdorr
authored andcommitted
Update jsdoc comments: ReactReduxContext type (#1464)
1 parent 07519e0 commit a51296f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/hooks/useDispatch.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ import { useStore as useDefaultStore, createStoreHook } from './useStore'
44
/**
55
* Hook factory, which creates a `useDispatch` hook bound to a given context.
66
*
7-
* @param {Function} [context=ReactReduxContext] Context passed to your `<Provider>`.
7+
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
88
* @returns {Function} A `useDispatch` hook bound to the specified context.
99
*/
1010
export function createDispatchHook(context = ReactReduxContext) {
1111
const useStore =
1212
context === ReactReduxContext ? useDefaultStore : createStoreHook(context)
13+
1314
return function useDispatch() {
1415
const store = useStore()
1516
return store.dispatch

src/hooks/useSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function useSelectorWithStoreAndSubscription(
8686
/**
8787
* Hook factory, which creates a `useSelector` hook bound to a given context.
8888
*
89-
* @param {Function} [context=ReactReduxContext] Context passed to your `<Provider>`.
89+
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
9090
* @returns {Function} A `useSelector` hook bound to the specified context.
9191
*/
9292
export function createSelectorHook(context = ReactReduxContext) {

src/hooks/useStore.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useReduxContext as useDefaultReduxContext } from './useReduxContext'
55
/**
66
* Hook factory, which creates a `useStore` hook bound to a given context.
77
*
8-
* @param {Function} [context=ReactReduxContext] Context passed to your `<Provider>`.
8+
* @param {React.Context} [context=ReactReduxContext] Context passed to your `<Provider>`.
99
* @returns {Function} A `useStore` hook bound to the specified context.
1010
*/
1111
export function createStoreHook(context = ReactReduxContext) {

0 commit comments

Comments
 (0)