Mutating with useSWRInfinite #874
Unanswered
htunnicliff
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I found my self using the same patterns for looping though pages of data and then the data and transforming the data. So I wrote some data transform until functions for create, edit and delete in a util file and use them everywhere. It was typescript friendly using an interface that just looks for items with ID so I can use them for pretty much every API call. As everyone's API looks different it's not something that can be built into SWR. |
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.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all! Does anyone have a good idea of how to use mutate well with
useSWRInfinite
? I'm finding myself writing functions like this and it just feels like there has to be a better way:Beta Was this translation helpful? Give feedback.
All reactions