Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ahooks

Package Overview
Dependencies
Maintainers
5
Versions
111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ahooks - npm Package Compare versions

Comparing version 2.10.11 to 2.10.12

LICENSE

4

es/useEventEmitter/index.js

@@ -20,3 +20,5 @@ var __values = this && this.__values || function (o) {

var EventEmitter = function () {
var EventEmitter =
/** @class */
function () {
function EventEmitter() {

@@ -23,0 +25,0 @@ var _this = this;

@@ -58,2 +58,3 @@ var __read = this && this.__read || function (o, n) {

var websocketRef = useRef();
var unmountedRef = useRef(false);

@@ -117,2 +118,6 @@ var _d = __read(useState(), 2),

if (unmountedRef.current) {
return;
}
reconnect();

@@ -166,2 +171,3 @@ onClose && onClose(event);

useUnmount(function () {
unmountedRef.current = true;
disconnect();

@@ -168,0 +174,0 @@ });

@@ -27,3 +27,5 @@ "use strict";

var EventEmitter = function () {
var EventEmitter =
/** @class */
function () {
function EventEmitter() {

@@ -30,0 +32,0 @@ var _this = this;

@@ -74,2 +74,3 @@ "use strict";

var websocketRef = react_1.useRef();
var unmountedRef = react_1.useRef(false);

@@ -133,2 +134,6 @@ var _d = __read(react_1.useState(), 2),

if (unmountedRef.current) {
return;
}
reconnect();

@@ -182,2 +187,3 @@ onClose && onClose(event);

useUnmount_1["default"](function () {
unmountedRef.current = true;
disconnect();

@@ -184,0 +190,0 @@ });

{
"name": "ahooks",
"version": "2.10.11",
"version": "2.10.12",
"description": "react hooks library",

@@ -35,3 +35,3 @@ "keywords": [

"dependencies": {
"@ahooksjs/use-request": "^2.8.12",
"@ahooksjs/use-request": "^2.8.13",
"@types/js-cookie": "^2.2.6",

@@ -64,3 +64,3 @@ "dayjs": "^1.9.1",

"license": "MIT",
"gitHead": "561ebf0c820fa5fd6f1a8e83d6a8de3474254921"
"gitHead": "9285107e858e38d6042c76b7a9780ac5040cf657"
}

Sorry, the diff of this file is too big to display

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