---
title: "Discussion on \"An easier way to handle LOADING, ERROR and SUCCESS states in Redux\" | Hashnode"
description: "Discussion on \"An easier way to handle LOADING, ERROR and SUCCESS states in Redux\". Hey there 👋🏽, \nFirstly, sorry I couldn't come up with a more catchy name 😩. Believe me, I tried.\nWe know that the boilerplate for Redux can be a little bit, yunno, annoying... And if you've got lots of states to manage, for maybe a huge awesome ap..."
url: "https://hashnode.com/posts/an-easier-way-to-handle-loading-error-and-success-states-in-redux/5f25550090ac4260edf34efb"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [An easier way to handle LOADING, ERROR and SUCCESS states in Redux](https://blog.adedaniel.com/an-easier-way-to-handle-loading-error-and-success-states-in-redux?utm_source=hashnode&utm_medium=feed)

Hey there 👋🏽, Firstly, sorry I couldn't come up with a more catchy name 😩. Believe me, I tried. We know that the boilerplate for Redux can be a little bit, yunno, annoying... And if you've got lots of states to manage, for maybe a huge awesome ap...

Aug 1, 2020 · 15 min read · blog.adedaniel.com  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#redux](https://hashnode.com/tag/redux)
-   [#javascript](https://hashnode.com/tag/javascript)

## Written by

[Daniel Adetola](https://hashnode.com/@adedaniel)

@adedaniel

  
[View profile](https://hashnode.com/@adedaniel)

Senior Frontend Engineer

I'm Daniel Ade, and I work as a Senior frontend engineer. I'm really good at React JS, Typescript, Gatsby, Next.js, GraphQL, Redux, Firebase, and every modern styling framework you can think of (seriously!)

## Responses 2

Markdown supported · ⌘↵ to post

[Mark Erikson](https://hashnode.com/@acemarke)

[Aug 1, 2020](https://hashnode.com/posts/an-easier-way-to-handle-loading-error-and-success-states-in-redux/5f25550090ac4260edf34efb/comment/5f25a040669da9610ee17e17)

Hi, I'm a Redux maintainer.

You can simplify this code considerably by using [our official Redux Toolkit package](https://redux-toolkit.js.org/). It includes utilities to simplify several common Redux use cases, including store setup, defining reducers, immutable update logic, and even creating entire "slices" of state at once.

It also has [a `createAsyncThunk` API](https://redux-toolkit.js.org/api/createAsyncThunk) that automatically dispatches `pending/fulfilled/rejected` actions based on a promise, and [`createSlice`](https://redux-toolkit.js.org/api/createSlice) now offers ["matcher" reducers](https://redux-toolkit.js.org/api/createReducer#builderaddmatcher) that match against arbitrary actions (such as "any action whose type ends with `/pending`").

[We specifically recommend using RTK as the default way to write Redux logic](https://redux.js.org/style-guide/style-guide#use-redux-toolkit-for-writing-redux-logic), and I just published a brand-new "Redux Essentials" core docs tutorial, which teaches beginners "how to use Redux, the right way", using our latest recommended tools and practices. I'd encourage you to check it out:

[redux.js.org/tutorials/essentials/part-1-overview…](https://redux.js.org/tutorials/essentials/part-1-overview-concepts)

[Pelumi Ogunwale](https://hashnode.com/@calebdeji)

[Aug 1, 2020](https://hashnode.com/posts/an-easier-way-to-handle-loading-error-and-success-states-in-redux/5f25550090ac4260edf34efb/comment/5f258e6a90ac4260edf35362)

This is nice, Daniel! Thanks.

[Daniel Adetola](https://hashnode.com/@adedaniel)

[Aug 1, 2020](https://hashnode.com/posts/an-easier-way-to-handle-loading-error-and-success-states-in-redux/5f25550090ac4260edf34efb/comment/5f258e6a90ac4260edf35362#reply-5f258ee390ac4260edf35369)

Thank you Caleb!
