redux-pack icon indicating copy to clipboard operation
redux-pack copied to clipboard

createActionPack

Open kuznetsov-online opened this issue 6 years ago • 1 comments

createActionPack it's like createAction from redux-actions (see README)

kuznetsov-online avatar Mar 23 '18 23:03 kuznetsov-online

I'm kinda just jumping in here, but as a consumer of this middleware, I wonder is this layer of abstraction even necessary? What's the key advantage here that makes this a must-have, and not just a neat addition?

Would this let you create multiple actions at once with one call to createActionPack like with redux-actions? e.g.

const { increment, decrement } = createActions({
  INCREMENT: (amount = 1) => ({ amount }),
  DECREMENT: (amount = 1) => ({ amount: -amount })
});

If so, I can see this being nice, although it doesn't really look like it. Anyway, just curious, I think this package is great, and if its a definite improvement, that's awesome, just wondering what exactly the key takeaway is.

no-stack-dub-sack avatar Apr 11 '18 23:04 no-stack-dub-sack