I've been trying to integrate Firebase into my react native app.
I created my RN project using react-native init myProjectName and cd ios && pod install
I've followed the installation guide from https://rnfirebase.io/.
after finish setup Firebase by yarn add @react-native-firebase/app and all other steps, I tried to integrate Firebase Cloud Firestore and followed this doc https://rnfirebase.io/firestore/usage , but then i got TypeError: undefined is not a function near (...'this.firestore.native.collectionGet...') error.
Here are the dependencies in package.json
"dependencies": {
"@react-native-firebase/app": "^7.2.0",
"@react-native-firebase/firestore": "^7.2.0",
"react": "16.11.0",
"react-native": "0.62.2"
},
Here are the codes in App.js
import React, {useEffect} from 'react';
import {SafeAreaView, View, Text, StatusBar} from 'react-native';
import firebase from '@react-native-firebase/app';
import firestore from '@react-native-firebase/firestore';
const App = () => {
const getData = async () => {
const db = await firestore().collection('stories').get();
console.log({db});
};
useEffect(() => {
getData();
});
return (
<>
<StatusBar />
<SafeAreaView>
<View>
<Text>Hello There</Text>
</View>
</SafeAreaView>
</>
);
};
export default App;
Here's are the screenshots of my projects:

