You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/integrations/react-native.md
+13-30Lines changed: 13 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,11 +6,22 @@ Regardless of which path you want to take, initial setup is the same, so we will
6
6
7
7
**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.
8
8
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
+
9
20
## Native Modules
10
21
11
22
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:
12
23
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)
14
25
1. When creating redux store pass `react-native-firebase` App instance into `reactReduxFirebase` when creating store:
15
26
16
27
**createStore.js**
@@ -48,40 +59,12 @@ Passing in an instance also allows for libraries with similar APIs (such as [`re
48
59
49
60
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).
50
61
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
-
80
62
## Creating Your Own
81
63
82
64
We are going to use the project name Devshare for example here. For your project, use your project name everywhere where Devshare is used.
83
65
84
66
### Start
67
+
85
68
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`.
86
69
1. Run `create-react-native-app Devshare` (again replace Devshare with the name of your project)
87
70
1. After that is complete, eject using `yarn eject` or `npm run eject`
* @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
+
exportconstv3ErrorMessage=
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'
0 commit comments