react-native-firebase/docs/README.md

61 lines
3.5 KiB
Markdown
Raw Normal View History

2017-04-27 11:18:12 +00:00
<h1 align="center">
2017-04-27 11:39:37 +00:00
<img src="https://camo.githubusercontent.com/6c827e5a0bb91259f82a1f4923ab7efa4891b119/687474703a2f2f692e696d6775722e636f6d2f303158514c30782e706e67"/><br>
2017-04-27 11:18:12 +00:00
2017-04-27 11:39:37 +00:00
React Native Firebase
2017-04-27 11:18:12 +00:00
</h1>
<div style="text-align: center;">
2017-06-20 20:28:14 +00:00
[![npm version](https://img.shields.io/npm/v/react-native-firebase.svg?style=flat-square)](https://www.npmjs.com/package/react-native-firebase)
[![NPM downloads](https://img.shields.io/npm/dm/react-native-firebase.svg?style=flat-square)](https://www.npmjs.com/package/react-native-firebase)
[![Package Quality](http://npm.packagequality.com/shield/react-native-firebase.svg?style=flat-square)](http://packagequality.com/#?package=react-native-firebase)
[![License](https://img.shields.io/npm/l/react-native-firebase.svg?style=flat-square)](/LICENSE)
[![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg?style=flat-square)](https://discord.gg/t6bdqMs)
[![Chat](https://img.shields.io/badge/chat-on%20gitter-a0e7a0.svg?style=flat-square)](https://gitter.im/invertase/react-native-firebase)
[![Donate](https://img.shields.io/badge/Donate-Patreon-green.svg?style=flat-square)](https://www.patreon.com/invertase)
2017-04-27 11:18:12 +00:00
</div>
---
RNFirebase is a _light-weight_ layer sitting on-top of the native Firebase libraries for both iOS and Android which mirrors the Firebase Web SDK as closely as possible.
Although the [Firebase Web SDK](https://www.npmjs.com/package/firebase) library will work with React Native, it is mainly built for the web.
2017-06-20 20:28:14 +00:00
RNFirebase provides a JavaScript bridge to the native Firebase SDKs for both iOS and Android therefore Firebase will run on the native thread, allowing the rest of your app to run on the [JS thread](https://facebook.github.io/react-native/docs/performance.html#javascript-frame-rate). The Firebase Web SDK also runs on the JS thread, therefore potentially affecting the frame rate causing jank with animations, touch events etc.
2017-04-27 11:18:12 +00:00
The native SDKs also allow us to hook into device sdk's which are not possible with the web SDK, for example crash reporting, offline realtime database support, analyics and more!
2017-06-14 22:49:44 +00:00
2017-06-20 20:28:14 +00:00
All in all, RNFirebase provides much faster performance (~2x) over the web SDK and provides device sdk's not found in the web sdk (see the feature table below).
2017-06-14 22:49:44 +00:00
---
## Supported Firebase Features
2017-06-16 13:24:05 +00:00
> The Web SDK column indicates what modules from the Firebase Web SDK are usable within React Native.
2017-06-14 22:49:44 +00:00
2017-06-16 11:24:36 +00:00
| Firebase Features | v1 | [v2](https://github.com/invertase/react-native-firebase/pull/130) | Web SDK |
| ---------------------- | :---: | :---: | :---: |
| AdMob | ❌ | ✅ | ❌ |
2017-06-16 11:24:36 +00:00
| Analytics             | ✅ | ✅ | ❌ |
| App Indexing           | ❌ | ❌ | ❌ |
2017-06-16 11:24:36 +00:00
| Authentication | ✅ | ✅ | ✅ |
| Cloud Messaging | ✅ | ✅ | ❌ |
2017-06-16 11:24:36 +00:00
| Crash Reporting | ✅ | ✅ | ❌ |
| Dynamic Links | ❌ | ❌ | ❌ |
| Invites | ❌ | ❌ | ❌ |
| Performance Monitoring | ✅ | ✅ | ❌ |
| Realtime Database | ✅ | ✅ | ✅ |
| - Offline Persistance | ✅ | ✅ | ❌ |
| Remote Config | ✅ | ✅ | ❌ |
| Storage | ✅ | ✅ | ❌ |
---
### Supported versions - Firebase / React Native
> The table below shows the minimum supported versions of the Firebase SDKs and React Native
2017-06-14 22:49:44 +00:00
| | v1 | [v2](https://github.com/invertase/react-native-firebase/pull/130)
| ---------------------- | :---: | :---: |
| React Native | 0.36.0+ | 0.40.0 + |
| Firebase Android SDK | 10.2.0+ | 11.0.0 + |
| Firebase iOS SDK | 3.15.0+ | 4.0.0 + |