Skip to content

Commit 4649f8b

Browse files
trappartimdorr
authored andcommitted
Update jsdocs for hooks (#1295)
* Make second argument to useSelector optional * Update useDispatch jsdoc return
1 parent 18bd1aa commit 4649f8b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/hooks/useDispatch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useStore } from './useStore'
55
* might want to use this hook it is recommended to use `useActions` instead to bind
66
* action creators to the `dispatch` function.
77
*
8-
* @returns {any} redux store's `dispatch` function
8+
* @returns {any|function} redux store's `dispatch` function
99
*
1010
* @example
1111
*

src/hooks/useSelector.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const refEquality = (a, b) => a === b
2525
* whether the component needs to be re-rendered.
2626
*
2727
* @param {Function} selector the selector function
28-
* @param {Function} equalityFn the function that will be used to determine equality
28+
* @param {Function=} equalityFn the function that will be used to determine equality
2929
*
3030
* @returns {any} the selected state
3131
*

0 commit comments

Comments
 (0)