Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@react-native-firebase/app

Package Overview
Dependencies
Maintainers
2
Versions
258
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native-firebase/app

A well tested, feature rich Firebase implementation for React Native, supporting iOS & Android. Individual module support for Admob, Analytics, Auth, Crash Reporting, Cloud Firestore, Database, Dynamic Links, Functions, Messaging (FCM), Remote Config, Sto

  • 0.1.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
567K
increased by11.85%
Maintainers
2
Weekly downloads
 
Created

What is @react-native-firebase/app?

@react-native-firebase/app is a module that provides the core functionality for integrating Firebase services into a React Native application. It acts as the base for other Firebase services such as authentication, database, storage, and more.

What are @react-native-firebase/app's main functionalities?

Initialize Firebase

This code initializes the Firebase app with the provided configuration. It checks if any Firebase app instances already exist to avoid re-initialization.

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

const firebaseConfig = {
  apiKey: 'your-api-key',
  authDomain: 'your-auth-domain',
  projectId: 'your-project-id',
  storageBucket: 'your-storage-bucket',
  messagingSenderId: 'your-messaging-sender-id',
  appId: 'your-app-id',
};

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

Access Firebase Services

This code demonstrates how to access Firebase services like Authentication and Firestore. It includes examples of signing in a user and fetching data from a Firestore collection.

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

// Example: Using Firebase Authentication
const signIn = async (email, password) => {
  try {
    await auth().signInWithEmailAndPassword(email, password);
    console.log('User signed in!');
  } catch (error) {
    console.error(error);
  }
};

// Example: Using Firestore
const getUsers = async () => {
  const usersCollection = await firestore().collection('Users').get();
  usersCollection.forEach(documentSnapshot => {
    console.log('User ID: ', documentSnapshot.id, documentSnapshot.data());
  });
};

Other packages similar to @react-native-firebase/app

Keywords

FAQs

Package last updated on 08 Aug 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc