0
votes

This Error Show In react-native please Give Me Solution Firebase: Firebase App named '[DEFAULT]' already exists (app/duplicate-app). import * as firebase from "firebase"; require("firebase/firestore") const firebaseConfig = { configuration }; // Initialize Firebase firebase.initializeApp(firebaseConfig); var db = ...

1

1 Answers

2
votes

Are you using the wrong package?

Installation

# Install & setup the app module
yarn add @react-native-firebase/app

# Install the firestore module
yarn add @react-native-firebase/firestore

Usage

import firestore from '@react-native-firebase/firestore';

const usersCollection = firestore().collection('Users');

https://rnfirebase.io/firestore/usage