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: why are you adding the error as selector in the code and is it useful to do that?
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.