@ez-dux/async
v1.1.0
Published
- epics, sagas and thunk extension
Downloads
2
Readme
@ez-dux/async
- epics, sagas and thunk extension
import { getSagaExtension, getThunkExtension, getObservableExtension } from "@ez-dux/async";
- createAsyncActionCreators();
import { createAsyncActionCreators } from "@ez-dux/async";
const asyncActionCreators = createAsyncActionCreators<Result, Payload, Meta, E>(NAMESPACE, 'LOAD_START');
- createSaga();
import { createSaga } from "@ez-dux/async";
const asyncFunction = async (payload, state, meta): Promise<Result> => { ... };
const saga = createSaga({
asyncActionCreators,
asyncFunction,
});
- createModule();
import { createModule } from "@ez-dux/async";
const NAMESPACE = 'my-module';
const myModule = createModule({
namespace: NAMESPACE,
actionName: 'my-action',
asyncFunction: (payload, meta) => {...},
});