<Doc>
Props
firestore?: Firestore
- The firebase firestore instance, optional if you put the <FirebaseApp> component at the root of your app, or higher than where you're using this component.ref: string | DocumentReference<Data>
- The document reference to create the store from. Can be a string, just likeposts/123
or aDocumentReference
object, using thedoc
firebase function.startValue?: Data
- The initial value of the store. This is useful if you want to avoid a loading state. The `Data` type is inferred from what data you give it and used for the DocumentReference too.log: boolean = false
- If true, the store will log additional information to the console.once: boolean = false
- If true, the store will only fetch the data once, and will not update when the data changes.
Slots & Props
default
The default slot is rendered when data is found.
data: Data
- The data object from firestore.ref: DocumentReference<Data> | null
- The document reference you gave.error: Error | null
- Error if any.
loading
The loading slot. This is rendered while the data is fetching.
fallback
The fallback slot. This is rendered when the data is not found.