Closed RWOverdijk closed 5 years ago
Env:
I just tried using this.. Module? Library?.. Code.
I had this with react-native-firebase:
react-native-firebase
firestore.collection('chats').where('members', 'array-contains', uid).onSnapshot(async (a) => { this.setState({ chats }); });
And now did this with firestorter:
firestorter
// Above the component class initFirestorter({ firebase }); const chatCollection: any = new Collection('chats', { query: (ref: any) => ref.where('members', 'array-contains', auth.currentUser!.uid) });
chatCollection.docs is always empty whereas this.state.chats isn't. Am I missing something?
chatCollection.docs
this.state.chats
Apparently nothing happens if your component isn't observed. Makes sense.
Env:
I just tried using this.. Module? Library?.. Code.
I had this with
react-native-firebase
:And now did this with
firestorter
:chatCollection.docs
is always empty whereasthis.state.chats
isn't. Am I missing something?