Replies: 3 comments 13 replies
-
Ah... at least looking at |
Beta Was this translation helpful? Give feedback.
-
You can use |
Beta Was this translation helpful? Give feedback.
-
And why exactly do you think you could not do that with the information returned from that approach? I added that api for that.
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a table where I can delete users as shown in the image bellow:

The query I used to fetch this data looks as follows:
And this is my redux-toolkit query API slice:
I want to see an optimistic Update immediately after I delete one of the clients (users) shown in the table, but how? do I have to pass the exact search filter everytime I want to emit an action like delete? Is there a way I can apply the optimistic update for whatever the search filter is used?
You may have noticed above in the code of
userSlice
-->deleteOneUserById
endpoint -->onQueryStarted
--> mainApi.util.updateQueryData that I'm writing a regular expression/./
. Basically here's the point, I want this argument to match whatever the argument is provided in the query, I don't care.Exactly here:
is there any way I can omit this argument or to let it match anything ??
Beta Was this translation helpful? Give feedback.
All reactions