1.2.0 • Published 8 years ago

dux-fetch v1.2.0

Weekly downloads
4
License
ISC
Repository
-
Last release
8 years ago

dux-fetch

Yet another redux fetch middleware

Dux

Refer https://github.com/erikras/ducks-modular-redux

How To Use ?

First, you should place all your dux component in path /dux.

A dux-fetch component look like this:

// users.js

// Actions
const FETCH_READ_USER = 'my-app/user/read';

// Reducer
const initState = {};

const reducer = handleActions({
    [FETCH_READ_USER]: (state, action) => ({}),
});

export default reducer;

// Action Creators
export const readUser = (id) => createFetchAction(
    FETCH_READ_USER,
    () => fetch(`/user/${id}/`)
);
1.2.0

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago