We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃憢
Would love to use the new Firestore collection group feature in react-firestore
https://firebase.google.com/docs/firestore/query-data/queries#collection-group-query
The text was updated successfully, but these errors were encountered:
something like
import Firebase from 'firebase/app' import React from 'react' class FirestoreCollectionGroup extends React.Component { state = { isLoading: true, error: null, data: null, snapshot: null, } componentDidMount() { this.unsubscribe = Firebase.firestore() .collectionGroup(this.props.path) .where(this.props.filter[0], this.props.filter[1], this.props.filter[2]) .onSnapshot(this.handleBoard, this.handleError) } componentWillUnmount() { if (this.unsubscribe) { this.unsubscribe() } } handleBoard = snapshot => { this.setState({ isLoading: false, data: snapshot.docs.map(docSnap => docSnap.data()), snapshot, error: null, }) } handleError = error => { this.setState({ isLoading: false, data: null, snapshot: null, error, }) } render() { return this.props.children(this.state) } } export default FirestoreCollectionGroup
Sorry, something went wrong.
Actually just ran into a problem with collectionGroups and may not use them after all, but leaving open in case others have a need
No branches or pull requests
馃憢
Would love to use the new Firestore collection group feature in react-firestore
https://firebase.google.com/docs/firestore/query-data/queries#collection-group-query
The text was updated successfully, but these errors were encountered: