@jelper/hooks 0.1.0 → 0.1.2

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.
Files changed (4) hide show
  1. package/README.md +29 -1
  2. package/es/index.js +1656 -156
  3. package/lib/index.js +1654 -157
  4. package/package.json +6 -6
package/README.md CHANGED
@@ -1,3 +1,31 @@
1
1
  # @jelper/hooks
2
2
 
3
- react hooks helper
3
+ react基础hooks工具包
4
+
5
+ ## 安装
6
+
7
+ ``` bash
8
+ npm install @jelper/hooks --save
9
+ ```
10
+
11
+ ## 使用
12
+
13
+ ```javascript
14
+
15
+ import { useXxx } from '@jelper/hooks';
16
+
17
+ ```
18
+
19
+ ## API
20
+
21
+ ### useSafeState
22
+
23
+ 说明
24
+
25
+ 用法同 useState, 当调用组件销毁时,不再更新 state
26
+
27
+ ### useSafeCb
28
+
29
+ 用法同 useCallback, 当调用组件销毁时,不再执行回调函数
30
+
31
+