react-native-firebase/README.md

64 lines
3.2 KiB
Markdown
Raw Normal View History

2017-04-27 11:39:37 +00:00
# React Native Firebase<a href="https://invertase.io/react-native-firebase"><img align="left" src="http://i.imgur.com/01XQL0x.png"></a>
2017-02-14 16:02:54 +00:00
2017-03-27 16:20:08 +00:00
[![Chat](https://img.shields.io/badge/chat-on%20discord-7289da.svg)](https://discord.gg/t6bdqMs)
2017-03-23 17:05:28 +00:00
[![Gitter](https://badges.gitter.im/invertase/react-native-firebase.svg)](https://gitter.im/invertase/react-native-firebase?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
[![npm version](https://img.shields.io/npm/v/react-native-firebase.svg)](https://www.npmjs.com/package/react-native-firebase)
[![License](https://img.shields.io/npm/l/react-native-firebase.svg)](/LICENSE)
2017-05-08 17:18:34 +00:00
[![Donate](https://img.shields.io/badge/Donate-Patreon-green.svg)](https://www.patreon.com/invertase)
2017-02-14 16:02:54 +00:00
2017-03-23 17:05:28 +00:00
**RNFirebase** makes using [Firebase](http://firebase.com) with React Native simple.
2017-04-27 11:25:29 +00:00
> [Documentation](https://invertase.io/react-native-firebase)
2017-04-27 11:39:37 +00:00
<hr>
2017-03-23 17:05:28 +00:00
### Install
2017-04-27 11:25:29 +00:00
```bash
2017-02-14 16:02:54 +00:00
npm i react-native-firebase --save
```
2017-06-01 10:20:16 +00:00
> *Pst! [We're working on V2 with loads of new features!](https://github.com/invertase/react-native-firebase/pull/130)*
2017-03-23 17:05:28 +00:00
#### Platform specific setup guides:
2017-04-27 11:25:29 +00:00
[![ios](https://a.fsdn.com/sd/topics/ios_64.png)](http://invertase.io/react-native-firebase/#/installation-ios) [![android](https://a.fsdn.com/sd/topics/android_64.png)](http://invertase.io/react-native-firebase/#/installation-android)
2017-02-14 16:02:54 +00:00
2017-03-23 17:12:52 +00:00
<hr>
### Why
2017-02-14 16:02:54 +00:00
2017-03-23 17:05:28 +00:00
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.
2017-03-23 17:12:52 +00:00
Although the [Firebase Web SDK](https://www.npmjs.com/package/firebase) library will work with React Native, it is mainly built for the web.
RNFirebase provides a JavaScript bridge to the native Firebase SDKs for both iOS and Android. 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. All in all, RNFirebase provides much faster performance (~2x) over the web SDK.
2017-02-14 16:02:54 +00:00
2017-03-23 17:12:52 +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-02-14 16:02:54 +00:00
2017-06-14 22:51:01 +00:00
---
### Supported Firebase Features
2017-06-16 08:53:21 +00:00
> The Web SDK column indicates what modules from the Firebase Web SDK are usable with React Native.
| Firebase Features | v1 | [v2](https://github.com/invertase/react-native-firebase/pull/130) | Web SDK |
| ---------------------- | :---: | :---: | :---: |
| Analytics             | ✅ | ✅ | ❌ |
| Cloud Messaging | ✅ | ✅ | ❌ |
| Authentication | ✅ | ✅ | ✅ |
| Realtime Database | ✅ | ✅ | ✅ |
2017-06-16 11:25:02 +00:00
| - Offline Persistance | ✅ | ✅ | ❌ |
2017-06-16 08:53:21 +00:00
| Storage | ✅ | ✅ | ❌ |
| Performance Monitoring | ✅ | ✅ | ❌ |
| Crash Reporting | ✅ | ✅ | ❌ |
| Remote Config | ✅ | ✅ | ❌ |
| App Indexing           | ❌ | ❌ | ❌ |
| Dynamic Links | ❌ | ❌ | ❌ |
| Invites | ❌ | ❌ | ❌ |
| AdMob | ❌ | ✅ | ❌ |
2017-06-14 22:51:01 +00:00
---
2017-02-14 16:02:54 +00:00
2017-03-23 17:09:49 +00:00
### License
2017-03-16 16:27:01 +00:00
- MIT