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
{{ message }}
This repository has been archived by the owner on Jun 8, 2021. It is now read-only.
Following the conversation with @phryneas on the discord channel (link ), we noticed that the flow of responses in callback methods with a transformResponse does not guarantee the same shape of data, this requires to transform in each callback (potential bottleneck and error prone).
I don't have the time for a PR, so here's the steps to get there.
How to reproduce:
create a service
add a transformResponse callback (with a simple fn that changes the shape of response)
The above lines of code demonstrate that onSuccess and onError are called with the original data.
It's a bit unexpected that onSuccess and onError are called before the data is persisted in the store
Could be moved out of the asyncThunk into initiate.
The text was updated successfully, but these errors were encountered:
Following the conversation with @phryneas on the discord channel (link ), we noticed that the flow of responses in callback methods with a transformResponse does not guarantee the same shape of data, this requires to transform in each callback (potential bottleneck and error prone).
I don't have the time for a PR, so here's the steps to get there.
How to reproduce:
Expected:
"result" should be transformed
What happens:
"result" is not transformed
Code:
rtk-query/src/core/buildThunks.ts
Lines 235 to 241 in c769479
The above lines of code demonstrate that onSuccess and onError are called with the original data.
The text was updated successfully, but these errors were encountered: