Does Cloud Firestore support React Native

Viewed 3167

I currently use Firebase real-time database for my react-native mobile apps and I have been looking for some alternatives that provide better querying capabilities. One of the strong points for Firestore is its querying capabilities. I wanted to check if Firestore supports React Native out of the box.

4 Answers

The Oct 3rd release of React Native Firebase includes Cloud Firestore support.

First pass at support for the newly release Cloud Firestore beta, see http://invertase.link/firestore for supported api's.

import firebase from 'react-native-firebase';

firebase.firestore()
  .collection('posts')
  .add({
    title: 'Amazing post',
  })
  .then(() => {
    // Document added to collection and ID generated
    // Will have path: `posts/{generatedId}`
  })
Related