I have two components that share a service. One of the components gets an entire collection from Firestore as an observable.
The second component should display all the data for a single document. However, I am not sure how I can achieve this without querying the database again.
I have tried using pipe(map(documents => documents.find(...matching logic...))) on the existing observable, but it still queries the database again.
So TL;DR: I query an entire collection, how can I get a single document from that without querying the database again?
shareReplay(1)