Skip to content

Commit

Permalink
Fixed useMemo dependencies in react hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
klis87 committed Sep 6, 2019
1 parent bce35aa commit 03cc552
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/redux-saga-requests-react/src/use-mutation.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getMutation } from 'redux-saga-requests';
const useMutation = ({ requestSelector, type, requestKey }) => {
const mutationSelector = useMemo(
() => getMutation({ requestSelector, type, requestKey }),
[(requestSelector, type, requestKey)],
[requestSelector, type, requestKey],
);

return useSelector(mutationSelector);
Expand Down
2 changes: 1 addition & 1 deletion packages/redux-saga-requests-react/src/use-query.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { getQuery } from 'redux-saga-requests';
const useQuery = ({ requestSelector, type, defaultData, multiple }) => {
const querySelector = useMemo(
() => getQuery({ requestSelector, type, defaultData, multiple }),
[(requestSelector, type, defaultData, multiple)],
[requestSelector, type, defaultData, multiple],
);

return useSelector(querySelector);
Expand Down

0 comments on commit 03cc552

Please sign in to comment.