Skip to content

Commit

Permalink
Refactored package.json;
Browse files Browse the repository at this point in the history
  • Loading branch information
DigitalBrainJS committed Jan 4, 2021
1 parent a0d6894 commit 3a7253a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ such as [cp-fetch](https://www.npmjs.com/package/cp-fetch) and [cp-axios](https:
you get a powerful tool for building asynchronous logic for your components.
You just have to use `generators` instead of an async function to make your code cancellable,
but basically, that just means you will have to use `yield` instead of `await` keyword.
## Installation :hammer:
- Install for node.js using npm/yarn:

```bash
$ npm install use-async-effect2 c-promise2
```

```bash
$ yarn add use-async-effect2 c-promise2
```
## Usage example
Minimal example with json request [Live demo](https://codesandbox.io/s/friendly-murdock-wxq8u?file=/src/App.js)
````jsx
Expand Down
17 changes: 12 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@
"pause",
"task"
],
"repository": "https://github.com/DigitalBrainJS/use-async-effect.git",
"bugs": {
"url": "https://github.com/DigitalBrainJS/use-async-effect/issues"
},
"dependencies": {
"browser-sync": "^2.26.13",
"c-promise2": "^0.10.8",
"react": "^17.0.1",
"react-dom": "^17.0.1"
},
"peerDependencies": {
"react": ">=16.8.0",
"c-promise2": ">=0.10.8"
},
"devDependencies": {
"@babel/core": "^7.12.10",
Expand All @@ -76,6 +80,7 @@
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-replace": "^2.3.4",
"browser-sync": "^2.26.13",
"assert": "^2.0.0",
"chai": "^4.2.0",
"concurrently": "^5.3.0",
Expand All @@ -86,6 +91,8 @@
"nodemon": "^2.0.6",
"prop-types": "^15.7.2",
"react-is": "^17.0.1",
"rollup": "^2.35.1"
"rollup": "^2.35.1",
"react": "^17.0.1",
"react-dom": "^17.0.1"
}
}

0 comments on commit 3a7253a

Please sign in to comment.