I am trying to append some data to my collection('user) with my doc('userName') .set with few datas (phone number, age) (array format).
Here is the code :
import firestore from '@react-native-firebase/firestore';
firestore()
.collection('user')
.doc('userName')
.set({
number: '034093434',
age: 30,
})
.then(() => {
alert('added to firestore');
});
But i am getting error says that :
TypeError: this._firestore.native.documentSet is not a. function. (In this._firestore.native.documentSet(this.path,(0,_serialize.buildNativeMap(data), setOptions);' this._firestore.native.documentSet' is undefined)
Not sure what i am missing.I followed this doc -> here.
Each time i will set the new data. so it should add as array (index wise).
Any help would be great. Thanks