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/recipes/react-native.md
+52-29Lines changed: 52 additions & 29 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,58 @@ 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
+
## Native Modules
10
+
11
+
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
+
13
+
1. Follow [use instructions in README](http://react-redux-firebase.com/#use)
14
+
1. When creating redux store pass `react-native-firebase` App instance into `reactReduxFirebase` when creating store:
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/v2.0.0/examples/complete/react-native-firebase).
50
+
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
+
9
61
## JS/Web
10
62
11
63
**NOTE**: Only works for versions `v2.0.0-alpha` and higher. For older versions please view the docs associated with previous version.
@@ -36,37 +88,8 @@ const store = createStore(
36
88
)
37
89
```
38
90
39
-
## Native Modules
40
-
41
-
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:
reactReduxFirebase(firebase, reduxConfig), // pass in react-native-firebase instance instead of config
61
-
applyMiddleware(...middleware)
62
-
)
63
-
)
64
-
```
65
-
The [react-native-firebase initial setup guide](http://invertase.io/react-native-firebase/#/initial-setup) has more information about how to setup your project for iOS/Android.
66
-
67
91
Full project source: [react-native complete example app](https://github.com/prescottprue/react-redux-firebase/tree/master/examples/complete/react-native)
0 commit comments