smsmslib 1.0.7 → 1.0.8
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.
- package/package.json +1 -1
- package/system/usememo.js +17 -0
package/package.json
CHANGED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
export function sj_memo_use(f_cal, a_arg, a_dep)
|
|
5
|
+
{
|
|
6
|
+
function f_cal_caller()
|
|
7
|
+
{
|
|
8
|
+
const ret = f_cal(...a_arg);
|
|
9
|
+
|
|
10
|
+
return ret;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
const ret_memo = useMemo(f_cal_caller, a_dep);
|
|
14
|
+
|
|
15
|
+
return ret_memo;
|
|
16
|
+
}
|
|
17
|
+
|