j. henryJ
Convex Communityโ€ข5mo agoโ€ข
3 replies
j. henry

Batch operations and cache invalidation

Sometimes the thing that makes Convex amazing is also challenging. ๐Ÿ˜‚

I have a React Native component that is built using a convex query to retrieve a set of data (for example, information on multiple people). The query returns a list of objects.

In the UI, one person is displayed at a time and the user can decide what to do with them - delete, keep, etc. Very "tinder-vibes".

Executing the CRUD operations immediately upon action means the original query is invalidated (because an object was deleted, let's say) and the list of objects/people is also updated.

This ultimately causes a weird user experience.

I also tried managing state in a different way and batch updated the people. This process can be slow though.

Any thoughts or ideas?
Was this page helpful?