What I’m trying to do:
On page load, I want to create a Firestore document (Submission
) and then immediately use that document on the same page to display/update fields. I also need to pass the document reference to future pages.
What’s going wrong:
Whenever I try to do both the creation and the query on the same page, the app crashes. I am guessing it's because the query is happening before the document is created.
Goal:
I just want to create the document on page load, query and use it immediately on that page, and later pass the ref along to other screens.
I’m open to any suggestions.
Thanks in advance! 🙏