Replies: 1 comment 1 reply
-
no, never mutate, always work immutably please |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hey there
I wonder if is there any examples of useinfiniteQuery optimistic update with supporting typescript?
I implemented a way but I feel like it's not the best and trying to find a better practice for it. also, I could not find a proper generic type to assign to the setQueryData function so I could use it on the updater function.
here is my code
Another question would be, can I mutate the oldFeed arg, or I should use something like immer?
Beta Was this translation helpful? Give feedback.
All reactions