FireStore Example Code
This document provides some examples for interfacing with cloud firestore. The API slightly different from the real-time database.
One important thing to note that you should only initialize the the App once
Here is an example of how you can set an item in a collection once you have initialized your Firebase App. This example writes a new document Mario to the characters collections
The next code snippet reads the value from the mario collection.
The Final Code Snippet setups up an onchange listener. That fires when ever the mario document is changed.