Socket
Socket
Sign inDemoInstall

@uiw/react-amap-utils

Package Overview
Dependencies
Maintainers
2
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uiw/react-amap-utils - npm Package Compare versions

Comparing version 5.0.8 to 5.0.9

18

cjs/index.js

@@ -150,4 +150,3 @@ "use strict";

};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [instance, props[eventName]]);
}, [instance, eventHandle]);
});

@@ -175,4 +174,4 @@ }

var vName = "".concat(name.charAt(0).toLowerCase()).concat(name.slice(1));
// eslint-disable-next-line react-hooks/rules-of-hooks
var _useState5 = (0, _react.useState)(props[vName]),
var eventHandle = props[vName];
var _useState5 = (0, _react.useState)(eventHandle),
_useState6 = (0, _slicedToArray2["default"])(_useState5, 2),

@@ -183,11 +182,10 @@ state = _useState6[0],

(0, _react.useEffect)(function () {
if (instance && props[vName] !== undefined) {
if (props[vName] !== state && instance[eName] && typeof instance[eName] === 'function') {
instance[eName](props[vName]);
setState(props[vName]);
if (instance && eventHandle !== undefined) {
if (eventHandle !== state && instance[eName] && typeof instance[eName] === 'function') {
instance[eName](eventHandle);
setState(eventHandle);
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [instance, props[vName]]);
}, [instance, eventHandle]);
});
}

@@ -122,4 +122,3 @@ import _extends from "@babel/runtime/helpers/extends";

};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [instance, props[eventName]]);
}, [instance, eventHandle]);
});

@@ -153,15 +152,14 @@ }

var vName = "" + name.charAt(0).toLowerCase() + name.slice(1);
var eventHandle = props[vName];
var [state, setState] = useState(eventHandle);
// eslint-disable-next-line react-hooks/rules-of-hooks
var [state, setState] = useState(props[vName]);
// eslint-disable-next-line react-hooks/rules-of-hooks
useEffect(() => {
if (instance && props[vName] !== undefined) {
if (props[vName] !== state && instance[eName] && typeof instance[eName] === 'function') {
instance[eName](props[vName]);
setState(props[vName]);
if (instance && eventHandle !== undefined) {
if (eventHandle !== state && instance[eName] && typeof instance[eName] === 'function') {
instance[eName](eventHandle);
setState(eventHandle);
}
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [instance, props[vName]]);
}, [instance, eventHandle]);
});
}
{
"name": "@uiw/react-amap-utils",
"version": "5.0.8",
"version": "5.0.9",
"description": "基于 React 封装的高德地图组件。AMap Component Based On React.",

@@ -36,4 +36,4 @@ "homepage": "https://uiwjs.github.io/react-amap",

"dependencies": {
"@uiw/react-amap-types": "5.0.8"
"@uiw/react-amap-types": "5.0.9"
}
}

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