You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the redux-actions library's version of createAction, you can provide an optional second argument, a payloadCreator function. In the past, I've used it for things like generating a unique id for a new item before passing it along. (I don't know if that is best practice though).
Is adding the payloadCreator argument to your version of createAction something you would consider?
The text was updated successfully, but these errors were encountered:
aholachek
changed the title
should createAction be able to accept a payloadCreator function as a second argument?
should createAction be able to accept a payloadCreator function as a second argument?
Jan 24, 2019
Yeah, it's absolutely something I'd like to consider - there's been a few other issues related to this topic. It just hasn't been a high enough priority.
Ah, got it, thanks (I didn't look very hard for previous issues about this). I'll close this. Thanks very much for making this library, it's going to be so nice to have a centralized place for these useful patterns.
Sure. Yeah, there's dozens (hundreds?) of similar libs out there already, but the goals are are to have one that's "official", and also integrates some other niceties.
Tell you what, leave a comment over in #91 regarding this.
In the redux-actions library's version of
createAction
, you can provide an optional second argument, apayloadCreator
function. In the past, I've used it for things like generating a unique id for a new item before passing it along. (I don't know if that is best practice though).Is adding the
payloadCreator
argument to your version ofcreateAction
something you would consider?The text was updated successfully, but these errors were encountered: