(question) Recursive subscription
See original GitHub issueWhat would be the best approach to subscribe to any change in the tree?
My firestore document layout
rootcollection
doc1
subcollection11
subdoc1
subdoc2
doc2
subcollection21
For example
- root level doc addition/removal/change
- subcollection addition/removal/change
- subdoc1 addition/removal/change
I tried
import { getFirestore } from 'redux-firestore';
getFirestore().get('/rootcollection') or getFirestore().setListeners('/rootcollection')
But it did not give me any data on subcollection level. Do i need to handle the subscription myself on client level? Or is there a better way?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
computer science - What kind of problem is the membership ...
What kind of problem is the membership problem of a recursive enumerable language, as opposed to the membership problem of a non r.e....
Read more >rxjs - Wait for Subscription set Recursively to Complete
I want to wait until each item in the array is recursively updated before the subscription is complete. The hidden field will be...
Read more >Recursion - LeetCode
# Title Acceptance Difficulty
2 Add Two Numbers 39.9% Medium
10 Regular Expression Matching 28.2% Hard
21 Merge Two Sorted Lists 62.0% Easy
Read more >5 Simple Steps for Solving Any Recursive Problem - YouTube
5 Simple Steps for Solving Any Recursive Problem. 822K views · 3 years ago ...more. Reducible. 224K. Subscribe. 28K. Share. Save. Report ...
Read more >Recursion for Coding Interviews: The Ultimate Guide
Here are a couple questions you can ask yourself to decide whether you should solve a given problem recursively: Does the problem fit...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There is not currently a way to check for subcollections that you don’t know the name of using Firestore’s client API, they suggest doing it within a cloud function with the Firebase Admin SDK as mentioned in this stackoverflow post and a few places in the Firebase docs.
My suggestion is to have a function handle getting the subcollection name using the admin SDK, then you can call that function from the client. Once the client has the subcollection name it can query for the data it needs. Be careful with security when using this pattern though.
Going to close since there are a few options for how to do this with functions, and it isn’t supported with the client SDK.