We will take a look at updating data first.
Updating data over Firebase was always a point of debate and discussion over StackOverflow; so for that, let's just explain the two principles over the new APIs and see how they differ from each other:
- The update() function will give us the option to send simultaneous update calls to our database, and won't do anything besides the expected behavior of an update function, that is, updating the data without altering the reference of the record.
- The set() function, within its behavior, changes the reference to the data itself while replacing it with a new one.
- What matters the most for us is the behavior we seek, so the Update function is the most suitable function call to go with ...