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

react-unplug

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-unplug - npm Package Compare versions

Comparing version 0.1.0 to 0.2.0

2

package.json
{
"name": "react-unplug",
"version": "0.1.0",
"version": "0.2.0",
"description": "Promise-wrapper to manage the state of react components",

@@ -5,0 +5,0 @@ "scripts": {

@@ -7,3 +7,3 @@ # react-unplug

```
```shell
# npm

@@ -19,6 +19,6 @@ npm install react-unplug

For React components, that use [fetch](https://developer.mozilla.org/en/docs/Web/API/Fetch_API) to update the state, unmounting can lead to the following issue:
```
setState(…): Can only update a mounted or mounting component.
This usually means you called setState() on an unmounted component. This is a no-op
```
>setState(…): Can only update a mounted or mounting component.
>This usually means you called setState() on an unmounted component. This is a no-op
The correct way to fix this issue, according to [the article](https://facebook.github.io/react/blog/2015/12/16/ismounted-antipattern.html), is to cancel any callbacks in `componentWillUnmount`, prior to unmounting.

@@ -25,0 +25,0 @@

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