@base-stone/hooks 1.0.9 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -257,17 +257,19 @@ function de({
|
|
|
257
257
|
dataKey: e,
|
|
258
258
|
initialValue: r
|
|
259
259
|
}) {
|
|
260
|
-
const n = r || (o === "Array" ? [] : /* @__PURE__ */ Object.create({})), [p, u] = S(n), [c, a] = S(!1), l = b(t), f = async (
|
|
260
|
+
const n = r || (o === "Array" ? [] : /* @__PURE__ */ Object.create({})), [p, u] = S(n), [c, a] = S(!1), l = b(t), f = async (v) => {
|
|
261
261
|
a(!0);
|
|
262
|
-
const
|
|
263
|
-
u(
|
|
262
|
+
const g = await s(v ?? t);
|
|
263
|
+
u(g.data);
|
|
264
264
|
};
|
|
265
|
-
|
|
265
|
+
z(() => {
|
|
266
266
|
f(l.current);
|
|
267
|
-
}, [])
|
|
267
|
+
}, []);
|
|
268
|
+
const i = M(void 0);
|
|
269
|
+
return {
|
|
268
270
|
[e]: p,
|
|
269
271
|
loading: c,
|
|
270
|
-
refresh:
|
|
272
|
+
refresh: i
|
|
271
273
|
};
|
|
272
274
|
}
|
|
273
275
|
export {
|