Skip to content

Commit

Permalink
(fix) - useImmediateEffect disposer (#315)
Browse files Browse the repository at this point in the history
* (docs) - propose way for thirth party exchanges

* Revert "(docs) - propose way for thirth party exchanges"

This reverts commit 267102d.

* (fix) - ensure useImmediateEffect always has a function as disposer
  • Loading branch information
JoviDeCroock authored and kitten committed Jun 18, 2019
1 parent 7b2fc54 commit c623dff
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/useQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ export const useQuery = <T = any, V = object>(
useImmediateEffect(() => {
if (args.pause) {
unsubscribe.current();
return setState(s => ({ ...s, fetching: false }));
setState(s => ({ ...s, fetching: false }));
return noop;
}

executeQuery();
Expand Down

0 comments on commit c623dff

Please sign in to comment.