Skip to content
This repository has been archived by the owner on Jan 12, 2020. It is now read-only.

Latest commit

 

History

History
16 lines (12 loc) · 317 Bytes

DISPATCHER.md

File metadata and controls

16 lines (12 loc) · 317 Bytes

dispatcher 简单介绍

action 的结构遵循一定规范,以这个为前提,派发方式就可以更简洁

dispatch({
    type: 'app/fetch',
    payload: {
        id: 1
    }
}).then(...)

// =>

dispatcher.app.fetch({ id: 1 }).then(...)