RFC: Action/Thunks listeners
See original GitHub issueHey all;
The previous RFC process I opened for the computed property was extremely useful - I received a lot of quality feedback which helped guide me to the best API. Therefore I’d like to use the same process for an adjusted action/thunk listener API.
The current action/thunk listeners API (configured via the listenTo config) has a few shortcomings, namely:
- Error payloads are not exposed when listening to failed thunk events
- If you are listening to multiple actions there is no way to distinguish which action is being responded to.
- The mechanism by which we listen to specific stages of a thunk does not feel as fluid as the rest of the API
- Can’t listen to a “finally” stage of thunks (i.e. failed or successful)
A lot of these concerns have been raised very helpfully by @allpro - which is highly appreciated.
Prior to us going to v3 (with an opportunity to introduce some small breaking changes), I definitely would like us to address these shortcomings. Either enhancing the existing API, or providing an alternative richer one.
I am going to be laying out a few proposals based on some experiments I have made, taking into account the above related issues.
Issue Analytics
- State:
- Created 4 years ago
- Comments:24 (21 by maintainers)

Top Related StackOverflow Question
Looks solid to me! 👍
A couple typos I see:
🎉 Great work Sean. It’s damn hard to fit so many features into a simple, intuitive API.
I hope to soon start training 25 developers, in 3 countries, to use Easy-Peasy, and phase-out Saga. So it’s great news that the API is stabilizing.