Comparing version 0.5.2 to 0.5.3
@@ -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", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38900