I would like to be able to resume watching Firestore without it reloading all documents that I already have when using server side rendering.
I image that the flow would work something like this:
- Fetch data from Firestore on the server, and use this data to server side render my application
- Pass this data on to the client so that it is immediately available when hydrating
- Also pass on the
resumeTokenso that the client knows where to pick up syncing
- On the client, use the
resumeTokento start watching for changes, immediately getting any changes that occurred between the server side render and the client watch, but not re-downloading everything that didn’t change.
There is a
resumeToken of some sort, but I couldn’t find anything regarding it in the documentation, and it doesn’t seem exposed unless by reading from indexeddb
targets. So what the Feature Request would involve is adding a way to see this resumeToken (maybe on querySnapshot metadata?) and passing it into the SDK when creating a new query.
Thanks for making firebase, it’s really nice to build apps on.