Skip to Content
Serverless Web Applications with React and Firebase
book

Serverless Web Applications with React and Firebase

by Mayur Tanna, Harmeet Singh
April 2018
Intermediate to advanced content levelIntermediate to advanced
284 pages
6h 43m
English
Packt Publishing
Content preview from Serverless Web Applications with React and Firebase

Avoid arrays

The Firebase documentation has already mentioned and cleared this topic to avoid using arrays in Firebase Database, but I want to highlight some of the use cases where you can use the Arrays for storing the data.

Refer to the following points; if all the following are true, we can use Array to store the data in Firebase:

  • If one client can write the data at a time
  • For removing the keys, instead of using .remove(), we can save the array and splice it
  • We need to take care when referring to anything by array index (a mutable key)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Web Applications with Firebase

Building Web Applications with Firebase

Gareth Brown
React Native in Action

React Native in Action

nader dabit, Nickie Buckner

Publisher Resources

ISBN: 9781788477413Supplemental Content