Comparing version 0.4.1 to 0.4.2
@@ -244,10 +244,7 @@ "use strict"; | ||
} | ||
// onUnmount | ||
return function () { | ||
// Cancel any running request when unmounting to avoid updating state after component has unmounted | ||
// This can happen if a request's promise resolves after component unmounts | ||
request.abort(); | ||
mounted.current = false; | ||
}; | ||
return function () { return mounted.current = false; }; | ||
}, dependencies); | ||
// Cancel any running request when unmounting to avoid updating state after component has unmounted | ||
// This can happen if a request's promise resolves after component unmounts | ||
react_1.useEffect(request.abort, []); | ||
if (suspense && suspender.current) { | ||
@@ -254,0 +251,0 @@ if (isServer) |
{ | ||
"name": "use-http", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"homepage": "http://use-http.com", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
153602
1684