Skip to content
Advertisement

Tag: firebase

delete a collection with document and collection again inside (firestore react native)

I am having trouble deleting on firestore here’s my delete but everytime i try to delete nothing happens . There’s no error at all . this is how I set that collection Answer If you want to delete all the docs of the messages (sub)collection, you need to query the collection and delete each document, for example by using Promise.all()

What is the typeof of a QuerySnapshot?

With firebase, you can get documents in a collection like this: const collectionData = await collectionPath.get(); using collectionData, you can loop with: The above code makes collectionData behave like an array of documents. However, you can still treat it like an object by calling things like size? e.g collectionData.size will return the size of items in there. My question is,

TypeError: undefined is not an object(evaluating ‘_$$_REQUIRE(_dependencyMap[9], “../../config/FIREBASE”).FIREBASE.database’)

I have installed Firebase with npm in Firebase, but I don’t know what happens with this error. File FIREBASE.js TambahKontak.js Answer You aren’t using the new Modular/Functional syntax which is included from version 9.0.0+. You would have to rewrite your code to follow the new syntax: If you want to use the existing code (with older syntax) then use compat

Advertisement