React Firebase
  • React Firebase
  • React Firebase Realtime Database
    • Setup
    • Usage
    • API
  • React Firebase Auth
    • Setup
    • Usage
    • API
  • React Firestore Database
    • Setup
    • Usage
    • API
  • Generate Firebase Data
    • Setup
    • Usage
  • Generate Firestore Data
    • Setup
    • Usage
  • Generate JSON Data
    • Setup
    • Usage
  • Guides
    • Build a React App with Firebase Auth and Realtime Database
      • Setup the development environment
      • Add React and React DOM
      • Add Firebase
      • Listen to auth
      • Adding Google and Anonymous Auth
      • Adding Data to your Realtime Database
      • Implementing the UI
      • Writing Data
      • Read Data
  • View Source
Powered by GitBook
On this page
  • Docs moved to https://react-firebase-js.com/docs/react-firestore-database/api
  • FirestoreProvider Props
  • Firestore Setup Reference
  • FirestoreCollection
  • Firestore Query Reference
  • FirestoreDocument
  • Firestore Query Reference
  • FirestoreMutation Props​
  • ​Firestore Write Data Reference​
  1. React Firestore Database

API

React bindings for Firebase Firestore API.

PreviousUsageNextGenerate Firebase Data

Last updated 6 years ago

Docs moved to

FirestoreProvider Props

Name

Type

Required

Default

firebase

yes

authDomain

string

yes

apiKey

string

yes

databaseURL

string

yes

projectId

string

yes

messagingSenderId

string

no

storageBucket

string

no

children

React Node

no

render

() => ReactNode

no

FirestoreCollection

Name

Type

Required

Default

path

string

yes

null

where

{}

no

null

where.field

string

no

undefined

where.operator

"<" | "<=" | "==" | ">" | ">=" | "array-contains"

no

undefined

where.value

any

no

undefined

orderBy

{ field: string; type?: "desc" | "asc" }[]

no

null

limit

number

no

null

startAt

PrimitiveType | PrimitiveType[] | DocumentSnapshot

no

null

endAt

PrimitiveType | DocumentSnapshot

no

null

startAfter

PrimitiveType | DocumentSnapshot

no

null

endBefore

PrimitiveType | DocumentSnapshot

no

null

FirestoreDocument

Same props as FirestoreCollection

Name

Type

Required

Default

path

string

yes

null

where

{}

no

null

where.field

string

no

undefined

where.operator

"<" | "<=" | "==" | ">" | ">=" | "array-contains"

no

undefined

where.value

any

no

undefined

orderBy

{ field: string; type?: "desc" | "asc" }[]

no

null

limit

number

no

null

startAt

PrimitiveType | PrimitiveType[] | DocumentSnapshot

no

null

endAt

PrimitiveType | DocumentSnapshot

no

null

startAfter

PrimitiveType | DocumentSnapshot

no

null

endBefore

PrimitiveType | DocumentSnapshot

no

null

FirestoreMutation Props​

Name

Type

Required

Default

path

string

yes

​

type

"set" | "update" | "add"

yes

​

children

( { runMutation: (value:any, options?:any) => Promise<{key?:string}> } ) => ReactNode

yes

null

https://react-firebase-js.com/docs/react-firestore-database/api
Firestore Setup Reference
Firestore Query Reference
Firestore Query Reference
​Firestore Write Data Reference​
firebase