2017-10-06 65 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。 –

相關問題