Integrating Firebase Realtime Database

It's time to integrate Firebase in our application. Though we have already seen the detailed description and features of Firebase Realtime Database in Chapter 2Connecting React to Redux and Firebasewe will see key concepts for JSON data architecture and best practices for the same. Firebase database stores data as a JSON tree.

Take into consideration this example:

{  "seats" : {    "seat-1" : {      "number" : 1,      "price" : 400,      "rowNo" : 1,      "status" : "booked"    },    "seat-2" : {      "number" : 2,      "price" : 400,      "rowNo" : 1,      "status" : "booked"    },    "seat-3" : {      "number" : 3,      "price" : 400,      "rowNo" : 1,      "status" : "booked"    },   "seat-4" : {      "number" : 4,      "price" : 400,      "rowNo" : 1,      "status" : "available"    },    ...  }}

Get Serverless Web Applications with React and Firebase now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.