Stale while revalidate for re-subscribed queries
Proposal: To improve the time to render, serve stale data from a cache (in memory) while the query subscription is still pending, especially if the user was on that page in the same session. In this case, we use non-persistent storage for the objects, so a session is assumed to be until the user refreshes the page.
Here's a proof of concept:
https://github.com/conradkoh/baby-tracker/blob/master/apps/mobile/lib/convex/use_query_swr.tsx#L5-L46
This solution duplicates in memory the objects returned from the server.
If there is first class support for such caching from the library, similar to how react-query does it, but with real time features, it would be amazing.
