---
title: "Comment by Slim on \"A better approach for testing your Redux code\" | Hashnode"
description: "Henrique Barcelos Very interesting and amazing article, you can update it using createAsyncThunk in v1.3.2 for async actions. But I have a simple question here:"
url: "https://hashnode.com/posts/a-better-approach-for-testing-your-redux-code/5ddb17a11d03daa468a991fc/comment/5e85d92907bee7152c3e2900"
---

[Discussion](https://hashnode.com/posts/a-better-approach-for-testing-your-redux-code/5ddb17a11d03daa468a991fc)

Comment [A better approach for testing your Redux code](https://hashnode.com/posts/a-better-approach-for-testing-your-redux-code/5ddb17a11d03daa468a991fc)

[Slim](https://hashnode.com/@slimhs)

[Apr 2, 2020](https://hashnode.com/posts/a-better-approach-for-testing-your-redux-code/5ddb17a11d03daa468a991fc/comment/5e85d92907bee7152c3e2900)

[Henrique Barcelos](https://hashnode.com/@hbarcelos) Very interesting and amazing article, you can update it using `createAsyncThunk` in v1.3.2 for async actions. But I have a simple question here: why are you adding the error as selector in the code and is it useful to do that?

[Henrique Barcelos](https://hashnode.com/@hbarcelos)

[Apr 22, 2020](https://hashnode.com/posts/a-better-approach-for-testing-your-redux-code/5ddb17a11d03daa468a991fc/comment/5e85d92907bee7152c3e2900#reply-5ea02ed612892a3c760b379f)

I have heard of `createAsyncThunk`, but didn't have a chance to play with it yet. As soon as I got some spare time I'll do that. Thanks.

I use selectors for anything I might want to use in a component.

Sometimes I want to provide feedback to the user about an action that failed, even if I need to embellish it first. For that reason, I need to extract the error from the store, therefore the selector.
