Don't perform fetch more than once.
This commit is contained in:
parent
0a1f1d8769
commit
5f59c2ffe2
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ export function useWebService(): [Maybe<TResponse>, Maybe<Error>] {
|
|||
.then(receive)
|
||||
.then((json) => setResponse(Response(json)))
|
||||
.catch((err) => setError(err));
|
||||
});
|
||||
}, []);
|
||||
|
||||
return [response, error];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue