From 4649f8bcf8beee86d11c64bf4c02c21be8673dc9 Mon Sep 17 00:00:00 2001 From: Jeff Way Date: Sun, 26 May 2019 10:20:21 -0700 Subject: [PATCH] Update jsdocs for hooks (#1295) * Make second argument to useSelector optional * Update useDispatch jsdoc return --- src/hooks/useDispatch.js | 2 +- src/hooks/useSelector.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hooks/useDispatch.js b/src/hooks/useDispatch.js index cdef99c9b..d88dd406e 100644 --- a/src/hooks/useDispatch.js +++ b/src/hooks/useDispatch.js @@ -5,7 +5,7 @@ import { useStore } from './useStore' * might want to use this hook it is recommended to use `useActions` instead to bind * action creators to the `dispatch` function. * - * @returns {any} redux store's `dispatch` function + * @returns {any|function} redux store's `dispatch` function * * @example * diff --git a/src/hooks/useSelector.js b/src/hooks/useSelector.js index 62171b3ee..38772f282 100644 --- a/src/hooks/useSelector.js +++ b/src/hooks/useSelector.js @@ -25,7 +25,7 @@ const refEquality = (a, b) => a === b * whether the component needs to be re-rendered. * * @param {Function} selector the selector function - * @param {Function} equalityFn the function that will be used to determine equality + * @param {Function=} equalityFn the function that will be used to determine equality * * @returns {any} the selected state *