Introduction:

Firebase documentation is fairly good it is easier to learn from sample projects. However, I am going to create a sample app that you can use as a reference for you to quickly find snippets of code to use in your future projects.

The sample app we are building in this article is a simple app with a list of book titles that we will perform all the CRUD (Create, read, update, and delete) functions.

Create (Insert a row to Firestore) :

Update (Edit a row in Firestore):

Or you can use a transaction which is recommended to prevent cases like two updates are requested at the same time

Delete (Delete a row in Firestore):

Retrieve (View all the rows in a collection from Firestore):

Resources:

You can find the full source code for the app project below:

Mobile Apps Developer