No results
Closed this issue · 1 comments
RWOverdijk commented
Env:
- React Native 0.59.2
- mobx: ^5.9.0
- mobx-react": ^5.4.3
- mobx-state-tree: ^3.10.2
I just tried using this.. Module? Library?.. Code.
I had this with react-native-firebase
:
firestore.collection('chats').where('members', 'array-contains', uid).onSnapshot(async (a) => {
this.setState({ chats });
});
And now did this with 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?
RWOverdijk commented
Apparently nothing happens if your component isn't observed. Makes sense.