Firebase JavaScript SDK和react-native-firebase有什么区别 [英] What's the difference between Firebase JavaScript SDK and react-native-firebase

查看:118
本文介绍了Firebase JavaScript SDK和react-native-firebase有什么区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正试图将Firebase(Cloud Firestore)用于本机应用程序,以存储我的JSON对象.

I am trying to use to use Firebase (Cloud Firestore) for a react-native app, to store my JSON objects.

我见过人们在他们的应用(npm install firebase)中使用Firebase的人,和其他人使用react-native-firebase.

I ve seen people using Firebase in their apps (npm install firebase), and others using react-native-firebase.

大多数博客都说Firebase本身是用于Web的,因此它们的本机支持是无/少".而另一些博客和firebase官方

Most blogs say that Firebase itself is meant for web, so their react-native support is none/less. While a few other blogs and firebase official blog say that Firebase supports react-native.

对于我的本机项目,我不确定要选择哪个库,它们之间有什么区别.

I am not sure which library to choose, for my react-native project, and what's the difference between them.

推荐答案

根据 GitHub上的项目描述:

React Native Firebase是连接的轻量级JavaScript层 您可以使用针对iOS和Android的本地Firebase SDK 尽可能接近官方Firebase Web SDK.

React Native Firebase is a light-weight javascript layer connecting you to the native Firebase SDKs for both iOS and Android which aimes to mirror the offical Firebase Web SDK as closely as possible.

尽管官方的Firebase JS SDK将与React Native一起使用;它 主要针对网络构建,与以下功能相比功能集有限 本地的.

Although the official Firebase JS SDK will work with React Native; it is mainly built for the web and has a limited feature-set compared to native.

因此,您应该选择它以响应本机平台.这样不仅可以使用更多功能,还可以受益于使用本机sdk(速度,内存消耗等)

So, you should choose it, for react native platform. This will allow you to use more features and also benefit from using native sdk's (speed, memory consumption, etc.)

这篇关于Firebase JavaScript SDK和react-native-firebase有什么区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆