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
+16-13
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ View deployed version of [Material Example](https://github.com/prescottprue/reac
19
19
## Features
20
20
- Integrated into redux
21
21
- Support for updating and nested props
22
-
-[Population capability](https://prescottprue.gitbooks.io/react-redux-firebase/content/populate.html) (similar to mongoose's `populate` or SQL's `JOIN`)
22
+
-[Population capability](http://react-redux-firebase.com/docs/populate.html) (similar to mongoose's `populate` or SQL's `JOIN`)
23
23
- Out of the box support for authentication (with auto load user profile)
24
24
- Firebase Storage Support
25
25
- Support small data ( using `value` ) or large datasets ( using `child_added`, `child_removed`, `child_changed` )
An example that user Material UI built on top of the output of [create-react-app](https://github.com/facebookincubator/create-react-app)'s eject command. Shows a list of todo items and allows you to add to them. This is what is deployed to [react-redux-firebase.firebaseapp.com](https://react-redux-firebase.firebaseapp.com/).
203
+
An example that user Material UI built on top of the output of [create-react-app](https://github.com/facebookincubator/create-react-app)'s eject command. Shows a list of todo items and allows you to add to them. This is what is deployed to [redux-firebasev3.firebaseapp.com](https://redux-firebasev3.firebaseapp.com/).
204
204
205
205
## Using with `redux-thunk`
206
206
If you are using `redux-thunk`, make sure to set up your thunk middleware using it's redux-thunk's `withExtraArgument` method so that firebase is available within your actions. Here is an example `createStore` function that adds `getFirebase` as third argument along with a thunk that uses it:
1. How is this different than [`redux-react-firebase`](https://github.com/tiberiuc/redux-react-firebase)?
274
277
275
278
This library was actually originally forked from redux-react-firebase, but adds extended functionality such as:
276
-
*[populate functionality](https://prescottprue.gitbooks.io/react-redux-firebase/content/populate.html) (similar to mongoDB or SQL JOIN)
277
-
*[`profileDecorator`](https://prescottprue.gitbooks.io/react-redux-firebase/content/config.html) - change format of profile stored on Firebase
278
-
*[`getFirebase`](https://prescottprue.gitbooks.io/react-redux-firebase/content/thunks.html) - access to firebase instance that fires actions when methods are called
279
-
*[integrations](https://prescottprue.gitbooks.io/react-redux-firebase/content/thunks.html) for [`redux-thunk`](https://github.com/gaearon/redux-thunk) and [`redux-observable`](https://redux-observable.js.org) - using `getFirebase`
280
-
*[access to firebase's `storage`](https://prescottprue.gitbooks.io/react-redux-firebase/content/storage.html) method`
279
+
*[populate functionality](http://react-redux-firebase.com/docs/populate.html) (similar to mongoDB or SQL JOIN)
280
+
*[`profileDecorator`](http://react-redux-firebase.com/docs/config.html) - change format of profile stored on Firebase
281
+
*[`getFirebase`](http://react-redux-firebase.com/docs/thunks.html) - access to firebase instance that fires actions when methods are called
282
+
*[integrations](http://react-redux-firebase.com/docs/thunks.html) for [`redux-thunk`](https://github.com/gaearon/redux-thunk) and [`redux-observable`](https://redux-observable.js.org) - using `getFirebase`
283
+
*[access to firebase's `storage`](http://react-redux-firebase.com/docs/storage.html) method`
281
284
*`uniqueSet` method helper for only setting if location doesn't already exist
282
285
* Object or String notation for paths (`[{ path: '/todos' }]` equivalent to `['/todos']`)
283
-
* Action Types and other Constants are exposed for external usage (such as `redux-observable`)
286
+
* Action Types and other Constants are exposed for external usage (such as with `redux-observable`)
284
287
285
288
#### Well why not combine?
286
-
I have been talking to the author of [redux-react-firebase]() about combining, but we are not sure that the users of both want that at this point. Join us on [the redux-firebase gitter](https://gitter.im/redux-firebase/Lobby) if you haven't already since a ton of this type of discussion goes on there.
289
+
I have been talking to the author of [redux-react-firebase](https://github.com/tiberiuc/redux-react-firebase) about combining, but we are not sure that the users of both want that at this point. Join us on [the redux-firebase gitter](https://gitter.im/redux-firebase/Lobby) if you haven't already since a ton of this type of discussion goes on there.
287
290
288
291
**Bottom line:** The author of redux-react-firebase was absent when functionality was needed by me and others, so this library was created.
React Higher Order component library for Firebase with Redux integration
4
-
5
-
## Demo
6
-
7
-
View deployed version of Material Example [here](https://redux-firebasev3.firebaseapp.com/)
8
-
9
-
10
-
## Features
11
-
- Higher Order Component (HOC) for react
12
-
- Integrated into redux
13
-
-[Population](/populate.md) capability (similar to mongo `populate` or SQL `JOIN`)
14
-
- Support small data ( using `value` ) or large datasets ( using `child_added`, `child_removed`, `child_changed` )
15
-
-[queries support](/queries.md) ( `orderByChild`, `orderByKey`, `orderByValue`, `orderByPriority`, `limitToLast`, `limitToFirst`, `startAt`, `endAt`, `equalTo` right now )
16
-
- Automatic binding/unbinding
17
-
- Declarative decorator syntax for React components
18
-
- Firebase v3+ support
19
-
- Support for updating and nested props
20
-
- Out of the box support for authentication (with auto load user profile)
21
-
- Lots of helper functions
22
-
23
-
24
-
## [Examples](examples)
25
-
26
-
#### [Simple Example](examples/simple)
27
-
28
-
A simple example that was created using [create-react-app](https://github.com/facebookincubator/create-react-app)'s. Shows a list of todo items and allows you to add to them.
29
-
30
-
#### [Decorators Example](examples/decorators)
31
-
32
-
The simple example implemented using decorators built from the output of [create-react-app](https://github.com/facebookincubator/create-react-app)'s eject command. Shows a list of todo items and allows you to add to them.
33
-
34
-
#### [Material Example](examples/material)
35
-
36
-
An example that user Material UI built on top of the output of [create-react-app](https://github.com/facebookincubator/create-react-app)'s eject command. Shows a list of todo items and allows you to add to them. This is what is deployed to [redux-firebasev3.firebaseapp.com](https://redux-firebasev3.firebaseapp.com/).
37
-
38
-
39
-
## Generator
40
-
41
-
[generator-react-firebase](https://github.com/prescottprue/generator-react-firebase) uses react-redux-firebase when opting to include redux
Special thanks to [Tiberiu Craciun](https://github.com/tiberiuc) for creating [redux-react-firebase](https://github.com/tiberiuc/redux-react-firebase), which this project is heavily based on.
Copy file name to clipboardExpand all lines: docs/api/compose.md
+42-3
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,50 @@
2
2
3
3
# reactReduxFirebase
4
4
5
-
Configuration call to be placed in compose call
5
+
Middleware that handles configuration (placed in redux's `compose` call)
6
6
7
7
**Parameters**
8
8
9
9
-`fbConfig`**[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object containing Firebase config including databaseURL
10
-
-`config`**[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Object containing other config such as userProfile
-`config`**[Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)** Containing react-redux-firebase specific config such as userProfile
15
+
-`config.userProfile`**[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)** Location on firebase to store user profiles
16
+
-`config.enableLogging`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Location on firebase to store user profiles. default: `false`
17
+
-`config.profileDecorator`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Location on firebase to store user profiles. default: `false`
18
+
-`config.updateProfileOnLogin`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not to update profile when logging in. default: `false`
19
+
-`config.profileParamsToPopulate`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not to update profile when logging in. default: `false`
Returns **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** That accepts a component a returns a wrapped version of component
Copy file name to clipboardExpand all lines: docs/api/connect.md
+45-1
Original file line number
Diff line number
Diff line change
@@ -9,4 +9,48 @@ to provided firebase paths using React's Lifecycle hooks.
9
9
10
10
-`watchArray`**[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)** Array of objects or strings for paths to sync from Firebase
// pass todos list from redux as this.props.todosList
51
+
exportdefaultconnect(({ firebase }) => ({
52
+
todosList:dataToJS(firebase, 'todos')
53
+
}))(fbWrapped)
54
+
```
55
+
56
+
Returns **[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** that accepts a component to wrap and returns the wrapped component
0 commit comments