New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

use-http

Package Overview
Dependencies
Maintainers
1
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-http - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

6

dist/useFetch.js

@@ -124,6 +124,6 @@ "use strict";

}
// 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
return request.abort;
}, 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, []);
return Object.assign([request, makeResponseProxy(res), loading, error], Object.assign({ request, response: makeResponseProxy(res) }, request));

@@ -130,0 +130,0 @@ }

{
"name": "use-http",
"version": "0.2.0",
"version": "0.2.1",
"homepage": "http://use-http.com",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -727,2 +727,3 @@ <a href="http://use-http.com">

- [ ] tests to make sure `response.formData()` and some of the other http `response methods` work properly
- [ ] aborts fetch on unmount
- [ ] take a look at how [react-apollo-hooks](https://github.com/trojanowski/react-apollo-hooks) work. Maybe ad `useSubscription` and `const request = useFetch(); request.subscribe()` or something along those lines

@@ -729,0 +730,0 @@ - [ ] make this a github package

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc