Closed osdiab closed 7 years ago
Oh oops, I read the source and docs more carefully and I think I understand it. Not an issue!
(for those who didn't get it, you can add a payload
member to the action alongside promise
(and meta
) and it will get passed onto the onStart
handler).
Is it possible to pass in a payload to be used in the start handler? My use case is I have a function that does a fetch for a specific item in a list, and I want it to display that particular item as loading in the list, so start needs to know which item was passed in. I can achieve this by creating a synchronous action and dispatch it alongside the async one, but this seems to add some bloat to the set of actions; is there a better way? Thanks!