Closed nachonavarro closed 3 months ago
Hi Nacho,
You are right, the onIdUpdate
is sync only right now, and it is the method you need.
Changing the id prop in the values does not change the id of the document, but the id value inside it (which probably you don't want)
Adding a feature request: make onIdUpdate
async.
By the way, we are also based in Madrid, you should join our discord community :)
https://discord.gg/fxy7xsQm3m
I just realised onIdUpdate
can be async as well if necessary, so I am closing this ticket
Hi!
I have a collection where I want the ID of each document to be a number that increases by 1 on each new document. So far I have a callback that does the following:
Problem
This generates two IDs, the auto-generated one by Firestore and the one I generated. How can I only use the one from Firestore? I saw the
onIdUpdate
callback but it's synchronous and I don't think it's intended to fetch other documents.Thanks!