File tree 2 files changed +22
-5
lines changed
2 files changed +22
-5
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ such as [cp-fetch](https://www.npmjs.com/package/cp-fetch) and [cp-axios](https:
19
19
you get a powerful tool for building asynchronous logic for your components.
20
20
You just have to use ` generators ` instead of an async function to make your code cancellable,
21
21
but basically, that just means you will have to use ` yield ` instead of ` await ` keyword.
22
+ ## Installation :hammer :
23
+ - Install for node.js using npm/yarn:
24
+
25
+ ``` bash
26
+ $ npm install use-async-effect2 c-promise2
27
+ ```
28
+
29
+ ``` bash
30
+ $ yarn add use-async-effect2 c-promise2
31
+ ```
22
32
## Usage example
23
33
Minimal example with json request [ Live demo] ( https://codesandbox.io/s/friendly-murdock-wxq8u?file=/src/App.js )
24
34
```` jsx
Original file line number Diff line number Diff line change 62
62
" pause" ,
63
63
" task"
64
64
],
65
+ "repository" : " https://github.com/DigitalBrainJS/use-async-effect.git" ,
66
+ "bugs" : {
67
+ "url" : " https://github.com/DigitalBrainJS/use-async-effect/issues"
68
+ },
65
69
"dependencies" : {
66
- "browser-sync" : " ^2.26.13 " ,
67
- "c-promise2 " : " ^0.10.8 " ,
68
- "react" : " ^17.0.1 " ,
69
- "react-dom " : " ^17.0.1 "
70
+ } ,
71
+ "peerDependencies " : {
72
+ "react" : " >=16.8.0 " ,
73
+ "c-promise2 " : " >=0.10.8 "
70
74
},
71
75
"devDependencies" : {
72
76
"@babel/core" : " ^7.12.10" ,
76
80
"@rollup/plugin-json" : " ^4.1.0" ,
77
81
"@rollup/plugin-node-resolve" : " ^11.0.1" ,
78
82
"@rollup/plugin-replace" : " ^2.3.4" ,
83
+ "browser-sync" : " ^2.26.13" ,
79
84
"assert" : " ^2.0.0" ,
80
85
"chai" : " ^4.2.0" ,
81
86
"concurrently" : " ^5.3.0" ,
86
91
"nodemon" : " ^2.0.6" ,
87
92
"prop-types" : " ^15.7.2" ,
88
93
"react-is" : " ^17.0.1" ,
89
- "rollup" : " ^2.35.1"
94
+ "rollup" : " ^2.35.1" ,
95
+ "react" : " ^17.0.1" ,
96
+ "react-dom" : " ^17.0.1"
90
97
}
91
98
}
You can’t perform that action at this time.
0 commit comments