Replies: 2 comments
-
To provide a code example of what I mean, I'd love it if this worked:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Then again, thinking about it, these records won't exist anyway, so they'll never get iterated on the first pass. Hmm, I'll have to think about this more. I guess I wish I could pass in an array of keys and data functions/objects, which would also make this really easy. As it is right now, I feel like the general mutate case is not quite sufficient and I would like to enhance this if possible. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As an example, I get a big request thing back. I want to write an array of objects to the cache (normalization etc). I compose my list of paths and check if the keys match, and then in the data function, I just have no way of telling where I am if its the first write to a normalized key. If the second argument was the key we were on, I could very easily write an array of objects in one update. As it is, I have to call mutate N times, and I can see the write update split over multiple renders, which sucks.
I'd be happy to take a crack at doing this myself.
Beta Was this translation helpful? Give feedback.
All reactions