goatslacker/alt

Util for generating the 3 action pairs.

開放

#285 建立於 2015年6月2日

 (5 則留言) (0 個反應) (0 位負責人)JavaScript (313 個分叉)batch import
help wanted

倉庫指標

星標
 (3,427 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

Would like a util that takes in a name and generates the 3 actions that you normally use with data sources/async:

Loading, Success, Failure actions.

API can be whatever, I'm thinking something like:

const actions = nameForThisFunctionHere('foo'); // = ['fooSuccess', 'fooLoading', 'fooFailed']

perhaps 2 functions, one to generate the array which can then be passed into generateActions and another one that actually creates the actions for you?

貢獻者指南