0.0.3 • Published 10 years ago

redux-async-get v0.0.3

Weekly downloads
4
License
MIT
Repository
github
Last release
10 years ago

Redux Async Get

Make easy to fetch data by ES7 async function with GET method for redux middleware.

Installation

npm install redux-async-get

Why use it

use redux-async-get

Easily for your redux action code.

const FetchUsers = () => (
  {
    url: 'https://randomuser.me/api/',
    done: (result, dispatch) => {
      if (result) {
        dispatch({
          type: FETCH_USERS,
          payload: result
        })
      }
    },
    error: (err) => { throw new Error(err) }
  }
)

License

MIT