Reputation: 65
I tried to make my query as it is in the code below but apparently the condition != does not work in firestore react native, can someone give me a hand ?
const getUsers = async () => {
const querySnap = await firestore().collection('users').where('email', '!=', user.email).get()
const allUsers = querySnap.docs.map(docSnap => docSnap.data())
console.log(allUsers)
setUsers(allUsers)
}
Upvotes: 0
Views: 46
Reputation: 1420
As @FrankvanPuffelen mentioned, the error may be related to your SDK version that doesn't support the !=
operator.
Try updating the SDK in order to solve the issue.
Upvotes: 1