Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Serverless Web Applications with React and Firebase

You're reading from   Serverless Web Applications with React and Firebase Develop real-time applications for web and mobile platforms

Arrow left icon
Product type Paperback
Published in Apr 2018
Publisher Packt
ISBN-13 9781788477413
Length 284 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Harmeet Singh Harmeet Singh
Author Profile Icon Harmeet Singh
Harmeet Singh
Mayur Tanna Mayur Tanna
Author Profile Icon Mayur Tanna
Mayur Tanna
Arrow right icon
View More author details
Toc

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"
    },
    ...
  }
}

The database uses a JSON tree, but data stored in the database can be represented as certain native types to help you write...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image