-
I use React Native to develop the app and integrate with firebase. Now I encounter a problem. I want to use the path to get the doc data, but it can not works. import '@react-native-firebase/app';
import firestore from '@react-native-firebase/firestore';
firestore()
.doc('test/a/b/c')
.get()
.then((res) => {
console.log('path exists', res.exists); // false
console.log('path data', res.data()); // undefined
}); And when I get the doc step by step, then it will return the data. import '@react-native-firebase/app';
import firestore from '@react-native-firebase/firestore';
firestore()
.collection('test')
.doc('a')
.collection('b')
.doc('c')
.get()
.then((res) => {
console.log('step exists', res.exists); // true
console.log('step data', res.data()); // Object {}
}); Is there something wrong with the way I'm using it? |
Beta Was this translation helpful? Give feedback.
Answered by
YaohanHu
Aug 31, 2021
Replies: 1 comment
-
I found it's not an error. Just a typo. I write the wrong path. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
YaohanHu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found it's not an error. Just a typo.
I write the wrong path.