rsa

redux-sequential-async-actions

redux async sequential

Showing:

Popularity

Downloads/wk

0

Maintenance

No Maintenance Data Available

Package

Dependencies

6

Size (min+gzip)

53.0KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

redux async actions,support sequential

options

  1. sequential,是否顺序执行
  2. prefix

安装:

  npm i redux-sequential-async-actions
  

使用方式:


applyMiddleware(
  reduxRequestWithCallbactions('/prefix')
)
export function fetchPageBaseInfo(pageId) {
    return {
        type: types.FETCH_PAGE_BASE_INFO,
        url: `/dva/api/pages-history/${pageId}`,
        sequential: true,//promise来支持顺序
        callbactions: (result) => {
            const {id, Scene, pageConfig, host} = result
            return [
                createQRCodePreview({pageKind: 'page', pageId: id, host}),
                getCurrentScene(Scene),
                // 因显示widget和setting和content具有依赖性,故此顺序
                fetchWidgets(pageConfig),
                fetchSettings({pageId: id, pageKind: 'page', ...pageConfig}),
                fetchSections({pageId: id, pageKind: 'page'})
            ]
        }
    }
}

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100