firebase/snippets-web

Can't delete firestore v9 collection by code in my react js app v18

urlsab opened this issue · 2 comments

I searched all over your docs and there is no writen solution besides for node.js (and not reactjs or web) or at console.
please fix that and add readable solution for that. thanks alot

@urlsab As mentioned in our docs:

Deleting collections from a Web client is not recommended.

That's due to the number of operations you'll need to do in order to achieve that (retrieve all documents from the collection and delete them one by one).

As an alternative, you can create a Cloud Function to do that on the server side as described in this page.

As mentioned, this page you gave is only for nodejs server side, and I'm looking for method to do that inside client side, like any other method you have, such as
'createUserWithEmailAndPassword'. Also this page you gave is unclear...how to import the key words and how to put in my reactjs code..