Skip to content

Commit

Permalink
fixed useIds not refreshing when ids changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SamiCharfeddine committed Nov 6, 2019
1 parent a929e8d commit 944e455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hooks/useIds.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function useIds(service, ids, query){
});
missingIds.current = arr;
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
}, [ids]);

const { request, requestId, setRequestId } = useRequest();

Expand Down Expand Up @@ -70,7 +70,7 @@ function useIds(service, ids, query){
setRequestId(lastRequestId);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [dispatch, service, updateMissingIds]);
}, [dispatch, service, updateMissingIds, ids]);

// Update status
useEffect(() => {
Expand Down

0 comments on commit 944e455

Please sign in to comment.