---
title: "Comment by Mark Erikson on \"An easier way to handle LOADING, ERROR and SUCCESS states in Redux\" | Hashnode"
description: "Hi, I&#39;m a Redux maintainer. You can simplify this code considerably by using our official Redux Toolkit package . It includes utilities to simplify several"
url: "https://hashnode.com/posts/an-easier-way-to-handle-loading-error-and-success-states-in-redux/5f25550090ac4260edf34efb/comment/5f25a040669da9610ee17e17"
---

[Discussion](https://hashnode.com/posts/an-easier-way-to-handle-loading-error-and-success-states-in-redux/5f25550090ac4260edf34efb)

Comment [An easier way to handle LOADING, ERROR and SUCCESS states in Redux](https://hashnode.com/posts/an-easier-way-to-handle-loading-error-and-success-states-in-redux/5f25550090ac4260edf34efb)

[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)
