Redux-toolkit: Missing loading variable at the Documentation examples for createAsyncThunk using rejectWithValue

Created on 21 May 2020  路  2Comments  路  Source: reduxjs/redux-toolkit

Hi, I was reviewing the documentation for use createAsyncThunk for use it with axios and, in the examples for rejectWithValue there is a loading prop destructured from the selector, but that loading is not used in the code example and is not defined in the initial state.

Is not an issue at all, but I am new in the createAsyncThunk API and in the first attemp I was thinking that loading was injected by the thunk, but I confirm that is not the case because the first example has it defined already

image

Most helpful comment

@franjorub Thanks, good catch.

All 2 comments

@franjorub Thanks, good catch.

happy to help

Was this page helpful?
0 / 5 - 0 ratings

Related issues

amankkg picture amankkg  路  4Comments

will-amaral picture will-amaral  路  3Comments

denu5 picture denu5  路  4Comments

jamesopstad picture jamesopstad  路  4Comments

emil14 picture emil14  路  3Comments