firebase app named default already exists react native

JavaScript
if (!firebase.apps.length) {
    firebase.initializeApp({});
}
Source

Also in JavaScript: