Skip to content

Commit

Permalink
Merge pull request #2 from sonofjavascript/badges-repo
Browse files Browse the repository at this point in the history
Badges repo
  • Loading branch information
sonofjavascript committed Jun 18, 2020
2 parents b1676c8 + 62d7817 commit 800e2e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![npm](https://img.shields.io/npm/v/@sonofjs/use-actions.svg) [![Build Status](https://travis-ci.com/sonofjavascript/use-actions.svg?branch=master)](https://travis-ci.com/sonofjavascript/use-actions) [![Coverage Status](https://coveralls.io/repos/github/sonofjavascript/use-actions/badge.svg)](https://coveralls.io/github/sonofjavascript/use-actions) [![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
![npm](https://img.shields.io/npm/v/@sonofjs/use-async.svg) [![Build Status](https://travis-ci.com/sonofjavascript/use-async.svg?branch=master)](https://travis-ci.com/sonofjavascript/use-async) [![Coverage Status](https://coveralls.io/repos/github/sonofjavascript/use-async/badge.svg)](https://coveralls.io/github/sonofjavascript/use-async) [![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)

# useAsync
<img src='https://onix-systems.com/uploads/eYdjjAuPgNzIPbGGJtMORLRQ9kYyQeKo.jpg' />
Expand Down Expand Up @@ -32,7 +32,7 @@ const actions = {
Note: *reducers are commonly defined through switch statements. Author's preference is to use always objects instead of those.*


The `request` key in the `ASYNC_ACTION` type indicates this action is asynchronous. In this example, the client agent will execute a `get` http call to the url `/api/data`. Optionally, to manage the state when the request has been successfully executed add an action with the same type followed by `_SUCCESS`; and to manage the state when the request has failed add an action with the same type followed by `_ERROR`. [See Actions, Dispatches and State](#actions-dispatches-state).
The `request` key in the `ASYNC_ACTION` type indicates this action is asynchronous. In this example, the client agent will execute a `get` http call to the url `/api/data`. Optionally, to manage the state when the request has been successfully executed add an action with the same type followed by `_SUCCESS`; and to manage the state when the request has failed add an action with the same type followed by `_ERROR`. [See Actions, Dispatches and State](#actions-dispatches-and-state).

Then, you only have to pass this actions objet to the `useAsync` hook.

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 800e2e8

Please sign in to comment.