DEV Community

Discussion on: Using request/success/failure pattern in Redux to handle async actions

Collapse
 
zhnedyalkow profile image
Zhitomir Oreshenski

Hi,

You can try to start implementing redux toolkit and redux thunk. It will simplify the aforementioned boiler plate code.

Collapse
 
sunil12738 profile image
Sunil Chaudhary

Hi Zhitomir,
Thanks for your valuable inputs.
Our team doesn't use this code directly. We have a lot of utility functions (inspired by redux-toolkit and redux-actions) which reduce this repetitive boilerplate code to zero. You can read the article published over here

Thread Thread
 
zhnedyalkow profile image
Zhitomir Oreshenski

Hi, thank you for your response.

Well, I have already used it in some of our projects, just shared my personal experience and this is one of the trends right now. I can verify that aforementioned pattern is easy to implement but of'course there are always alternatives. We try as much as possible to encapsulate each slice of the state in separate modul with all interfaces.