2017-10-06 126 views
2

我目前使用Firebase实时数据库作为我的反应原生移动应用程序,我一直在寻找一些替代方案,以提供更好的查询功能。 Firestore的强项之一是其查询功能。我想检查Firestore是否支持React Native。Cloud Firestore支持React Native

+0

你到那T中的公司的FireStore文档? – Rob

+0

我做过了,如果它支持或不支持React Native,则没有明确提及。 –

回答

6

React Native Firebase的Oct 3rd版本包含Cloud Firestore支持。

在为新发布云计算公司的FireStore测试版支持一通,看到 http://invertase.link/firestore为支持的API。

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}` 
    }) 
+0

感谢您的回复。我目前在反应本机应用程序中使用Firebase Web SDK,但我猜Firestore的Web SDK目前不支持React Native。 –