You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The loading flag is expected to be in the idle state. But by the time the payload creator is executed, the loading flag will have been changed to pending.
Hmm. Yeah, that does seem like a bug in the snippet. The hazards of trying to write snippets that aren't necessarily executable :)
Can you file a PR against the v1.3.0-integration branch to change it to something more appropriate? Probably something like if(loading === 'pending') return.
I understand
createAsyncThunk
executes in the following order:However this code snippet implies something different:
The
loading
flag is expected to be in theidle
state. But by the time the payload creator is executed, theloading
flag will have been changed topending
.Is this a bug in the example code?
The text was updated successfully, but these errors were encountered: