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: README.md
+46-21Lines changed: 46 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -30,12 +30,16 @@ The [Material Example](https://github.com/prescottprue/react-redux-firebase/tree
30
30
- Server Side Rendering Support
31
31
-[`react-native` support](/docs/recipes/react-native.md) using [native modules](http://docs.react-redux-firebase.com/history/v2.0.0/docs/recipes/react-native.html#native-modules) or [web sdk](/docs/recipes/react-native.md#jsweb)
32
32
33
-
## Install
33
+
## Installation
34
34
35
35
```bash
36
36
npm install --save react-redux-firebase
37
37
```
38
38
39
+
This assumes you are using [npm](https://www.npmjs.com/) as your package manager.
40
+
41
+
If you're not, you can access the library on [unpkg](https://unpkg.com/redux-firestore@latest/dist/redux-firestore.min.js), download it, or point your package manager to it. Theres more on this in the [Builds section below](#builds).
42
+
39
43
## Use
40
44
41
45
Include `reactReduxFirebase` (store enhancer) and `firebaseReducer` (reducer) while creating your redux store:
If you plan to use Firestore, you should checkout [`redux-firestore`][redux-firestore]. It integrates nicely with `react-redux-firebase` and it allows you to run Real Time Database and Firestore along side each other.
258
+
259
+
`react-redux-firebase` provides the `firestoreConnect` HOC (similar to `firebaseConnect`) for easy setting/unsetting of listeners.
260
+
261
+
Currently `react-redux-firebase` still handles auth when using [`redux-firestore`][redux-firestore] - The future plan is to also have auth standalone auth library that will allow the developer to choose which pieces they do/do not want.
262
+
253
263
## [Docs](http://react-redux-firebase.com)
254
264
See full documentation at [react-redux-firebase.com](http://react-redux-firebase.com)
255
265
@@ -262,11 +272,18 @@ See full documentation at [react-redux-firebase.com](http://react-redux-firebase
262
272
263
273
## [Examples](examples)
264
274
265
-
Examples folder is broken into two categories [complete](https://github.com/prescottprue/react-redux-firebase/tree/master/examples/complete) and [snippets](https://github.com/prescottprue/react-redux-firebase/tree/master/examples/snippets). `/complete` contains full applications that can be run as is, while `/snippets` contains small amounts of code to show functionality (dev tools and deps not included).
If you would like a project added to this section please reach out [over gitter][gitter-url]
279
+
280
+
### [Examples Folder](examples)
281
+
282
+
Examples folder is broken into two categories [snippets](examples/snippets) and [complete](examples/complete). `/complete` contains full applications that can be run as is, where as `/snippets` contains small amounts of code to highlight specific functionality (dev tools and deps not included).
266
283
267
284
#### [State Based Query Snippet](examples/snippets/stateBasedQuery)
268
285
269
-
Snippet showing querying based on data in redux state. One of the most common examples of this is querying based on the current users auth UID.
286
+
Snippet showing querying based on data in redux state. One of the more common examples is querying based on the current users auth UID.
If you plan to use Firestore, you should checkout [`redux-firestore`][redux-firestore]. It integrates nicely with `react-redux-firebase` (v2 only) and it allows you to run Real Time Database and Firestore along side each other.
304
-
305
-
`react-redux-firebase` provides the `firestoreConnect` HOC (similar to `firebaseConnect`) for easy setting/unsetting of listeners.
306
-
307
-
Currently `react-redux-firebase` still handles auth when using [`redux-firestore`][redux-firestore] - The future plan is to also have auth standalone auth library that will allow the developer to choose which pieces they do/do not want.
@@ -316,10 +325,26 @@ Currently `react-redux-firebase` still handles auth when using [`redux-firestore
316
325
317
326
The [examples folder](/examples) contains full applications that can be copied/adapted and used as a new project.
318
327
319
-
###FAQ
328
+
## FAQ
320
329
321
330
Please visit the [FAQ section of the docs](http://docs.react-redux-firebase.com/history/v2.0.0/docs/FAQ.html)
322
331
332
+
## Builds
333
+
334
+
Most commonly people consume Redux Firestore as a [CommonJS module](http://webpack.github.io/docs/commonjs.html). This module is what you get when you import redux in a Webpack, Browserify, or a Node environment.
335
+
336
+
If you don't use a module bundler, it's also fine. The redux-firestore npm package includes precompiled production and development [UMD builds](https://github.com/umdjs/umd) in the [dist folder](https://unpkg.com/redux-firestore@latest/dist/). They can be used directly without a bundler and are thus compatible with many popular JavaScript module loaders and environments. For example, you can drop a UMD build as a `<script>` tag on the page. The UMD builds make Redux Firestore available as a `window.ReduxFirestore` global variable.
Note: In an effort to keep things simple, the wording from this explanation was modeled after [the installation section of the Redux Docs](https://redux.js.org/#installation).
347
+
323
348
## Contributors
324
349
325
350
This project exists thanks to all the people who contribute.
0 commit comments