Skip to content

Commit 1e96425

Browse files
author
Scott Prue
committed
Merge branch 'master' into next
2 parents d3d9b73 + fb6c255 commit 1e96425

File tree

4 files changed

+31
-33
lines changed

4 files changed

+31
-33
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,14 @@
1111

1212
[![Gitter][gitter-image]][gitter-url]
1313

14-
1514
> Redux bindings for Firebase. Includes Higher Order Component (HOC) for use with React.
1615
1716
## [Demo](https://demo.react-redux-firebase.com)
1817

1918
The [Material Example](https://github.com/prescottprue/react-redux-firebase/tree/master/examples/complete/material) is deployed to [demo.react-redux-firebase.com](https://demo.react-redux-firebase.com).
2019

2120
## Features
22-
- Integrated into redux
21+
2322
- Out of the box support for authentication (with auto load user profile)
2423
- Full Firebase Platform Support Including Real Time Database, Firestore, and Storage
2524
- Automatic binding/unbinding of listeners through React Higher Order Components (`firebaseConnect` and `firestoreConnect`)
@@ -32,6 +31,8 @@ The [Material Example](https://github.com/prescottprue/react-redux-firebase/tree
3231

3332
## Installation
3433

34+
Interested in support for [`react-redux@^6`](https://github.com/reduxjs/react-redux) or the [new react context API](https://reactjs.org/docs/context.html)? Checkout [the `next` branch which contains the next upcoming major version](https://github.com/prescottprue/react-redux-firebase/tree/next) (installed through `npm i --save react-redux-firebase@next`).
35+
3536
```bash
3637
npm install --save react-redux-firebase
3738
```

book.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,17 @@
1919
"token": "UA-102355407-1"
2020
},
2121
"versions": {
22-
"gitbookConfigURL": "https://raw.githubusercontent.com/prescottprue/react-redux-firebase/master/book.json",
22+
"gitbookConfigURL": "https://storage.googleapis.com/docs.react-redux-firebase.com/book.json",
2323
"options": [
2424
{
2525
"value": "http://docs.react-redux-firebase.com/history/v2.0.0/",
2626
"text": "Version 2.0.0",
2727
"selected": true
2828
},
29+
{
30+
"value": "http://docs.react-redux-firebase.com/history/v3.0.0/",
31+
"text": "Version 3.0.0"
32+
},
2933
{
3034
"value": "http://docs.react-redux-firebase.com/history/v1.5.0/",
3135
"text": "Version 1.5.0"

docs/integrations/react-native.md

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,22 @@ Regardless of which path you want to take, initial setup is the same, so we will
66

77
**NOTE:** Make sure you include `enableRedirectHandling: false` when using react-native with `v2.0.0`. This is required to disable redirect handling (which uses http) since it is not supported in react-native. There has been discussion of a way to make this happen automatically, but for now it is required.
88

9+
## JS/Web
10+
11+
Setup and use `react-redux-firebase` as normal (described in the [use section of the README](https://github.com/prescottprue/react-redux-firebase#use)). Since Firebase is initialized outside of react-redux-firebase, the automatic handling of react-native done by Firebase works.
12+
13+
[react-native complete example app](https://github.com/prescottprue/react-redux-firebase/tree/master/examples/complete/react-native)
14+
15+
**NOTES**
16+
17+
* Only works for versions `v2.0.0` and higher. For older versions please view the docs associated with previous version.
18+
* Will not perform as well as using native modules since the render thread is used for all JS
19+
920
## Native Modules
1021

1122
Passing in an instance also allows for libraries with similar APIs (such as [`react-native-firebase`](https://github.com/invertase/react-native-firebase)) to be used instead:
1223

13-
1. Follow [use instructions in README](http://react-redux-firebase.com/#use)
24+
1. Follow [use instructions in README](https://github.com/prescottprue/react-redux-firebase#use)
1425
1. When creating redux store pass `react-native-firebase` App instance into `reactReduxFirebase` when creating store:
1526

1627
**createStore.js**
@@ -48,40 +59,12 @@ Passing in an instance also allows for libraries with similar APIs (such as [`re
4859

4960
Full `react-native-firebase` example app source with styling available [in the react-native-firebase complete example](https://github.com/prescottprue/react-redux-firebase/tree/master/examples/complete/react-native-firebase).
5061

51-
### Setup
52-
1. Run `create-react-native-app my-app`
53-
1. Enter the app folder `cd my-app`
54-
1. Run the eject command `yarn run eject` or `npm run eject` and choose "Regular React Native App"
55-
1. Run `npm i --save redux react-redux react-redux-firebase@canary redux-thunk`
56-
1. Open the xcode project in ios/myapp
57-
* Drag the `GoogleService-Info.plist` into the project -> check box saying copy
58-
* switch the identifier to the one you just gave Firebase
59-
1. Follow the [react-native-firebase initial setup guide](http://invertase.io/react-native-firebase/#/initial-setup)
60-
61-
## JS/Web
62-
63-
**NOTE**: Only works for versions `v2.0.0-alpha` and higher. For older versions please view the docs associated with previous version.
64-
65-
[react-native complete example app](/examples/complete/react-native)
66-
67-
Instantiate a Firebase instance outside of `react-redux-firebase` then pass it in as the first argument like so:
68-
69-
**NOTE**: If you are looking to use native modules (`react-native-firebase` or other), [visit the `v2.0.0` docs](http://docs.react-redux-firebase.com/history/v2.0.0/docs/recipes/react-native.html#native-modules)
70-
71-
## Setup
72-
73-
1. Click "Add Firebase To iOS"
74-
<!-- TODO: Confirm this and get a picture -->
75-
1. Download `GoogleService-info.plist`
76-
1. Place `GoogleService-info.plist` in the folder of whichever platform you are using (i.e. `/ios`)
77-
1. Copy your client id out of the `GoogleService-info.plist` file (should end in `.apps.googleusercontent.com`)
78-
1. Place the client id into `iosClientId` variable within the example
79-
8062
## Creating Your Own
8163

8264
We are going to use the project name Devshare for example here. For your project, use your project name everywhere where Devshare is used.
8365

8466
### Start
67+
8568
1. Make sure you have [`create-react-native-app`](https://github.com/react-community/create-react-native-app) installed, or install it using `npm install -g create-react-native-app`.
8669
1. Run `create-react-native-app Devshare` (again replace Devshare with the name of your project)
8770
1. After that is complete, eject using `yarn eject` or `npm run eject`

src/constants.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,16 @@ export const supportedAuthProviders = [
239239
*/
240240
export const topLevelPaths = ['auth', 'profile', 'ordered', 'data']
241241

242+
/**
243+
* @constant
244+
* @description Error message shown if runnning react-redux v6 with a v2.0.0 version
245+
* of react-redux-firebase
246+
* @type {String}
247+
* @private
248+
*/
249+
export const v3ErrorMessage =
250+
'Context from react-redux not found. If you are using react-redux v6 a v3.*.* version of react-redux-firebase is required. Please checkout the v3 migration guide: http://bit.ly/2SRNdiO'
251+
242252
export default {
243253
actionTypes,
244254
defaultConfig

0 commit comments

Comments
 (0)