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

rc-hooks

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-hooks - npm Package Compare versions

Comparing version 0.5.2 to 0.5.3

11

lib/useAsync/index.js

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

var _useState = (0, _react.useState)({
params: [],
// 参数兼容非array的情况
params: Array.isArray(defaultParams) ? defaultParams : [defaultParams],
loading: !!autoRun || defaultLoading,

@@ -222,3 +223,3 @@ error: null,

return run.apply(void 0, _toConsumableArray(state.params));
}, []);
}, [state.params]);
var rePolling = (0, _react.useCallback)(function () {

@@ -277,6 +278,4 @@ if (pollingWhenVisibleFlagRef.current) {

if (autoRun) {
// 参数兼容非array的情况
var _params = Array.isArray(defaultParams) ? defaultParams : [defaultParams];
run.apply(void 0, _toConsumableArray(_params));
// 参数可能为默认参数
run.apply(void 0, _toConsumableArray(state.params));
} // 订阅页面显示时轮询

@@ -283,0 +282,0 @@

{
"name": "rc-hooks",
"version": "0.5.2",
"version": "0.5.3",
"description": "React Hooks Library.",

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

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