Skip to content

Commit

Permalink
Add pathParams to the watching list to refetch
Browse files Browse the repository at this point in the history
  • Loading branch information
fabien0102 committed Jun 24, 2020
1 parent 82b6d98 commit 42d5694
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/useGet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,17 @@ export function useGet<TData = any, TError = any, TQueryParams = { [key: string]
return () => {
abort();
};
}, [props.lazy, props.mock, props.path, props.base, props.resolve, props.queryParams, props.requestOptions, abort]);
}, [
props.lazy,
props.mock,
props.path,
props.base,
props.resolve,
props.queryParams,
props.pathParams,
props.requestOptions,
abort,
]);

return {
...state,
Expand Down

0 comments on commit 42d5694

Please sign in to comment.