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
* Firebase Messaging service exposed (`firebase.messaging()`)
* `resetBeforeLogin` config option added (defaults to `true` to keep current behavior) - #254
@@ -118,7 +119,7 @@ class Todos extends Component {
118
119
console.log('Todo Created!')
119
120
})
120
121
.catch((err) => {
121
-
console.log('Error creating todo:', err) // error is also set to authError
122
+
console.log('Error creating todo:', err) // error is also set to state.firebase.authError
122
123
})
123
124
}
124
125
@@ -156,9 +157,9 @@ export default compose(
156
157
'todos'// { path: 'todos' } // object notation
157
158
]),
158
159
connect(
159
-
({ firebase } }) => ({// state.firebase
160
-
todos:dataToJS(firebase, 'todos'), // in v2 todos: firebase.data.todos
161
-
auth:pathToJS(firebase, 'auth') // in v2 todos: firebase.auth
160
+
(state) => ({
161
+
todos:dataToJS(state.firebase, 'todos'), // in v2 todos: state.firebase.data.todos
162
+
auth:pathToJS(state.firebase, 'auth') // in v2 todos: state.firebase.auth
162
163
})
163
164
)
164
165
)(Todos)
@@ -280,7 +281,7 @@ The [examples folder](/examples) contains full applications that can be copied/a
280
281
* tons of [integrations](#integrations)
281
282
*[`profileFactory`](http://react-redux-firebase.com/docs/config) - change format of profile stored on Firebase
282
283
*[`getFirebase`](http://react-redux-firebase.com/docs/thunks) - access to firebase instance that fires actions when methods are called
283
-
*[access to firebase's `storage`](http://react-redux-firebase.com/docs/storage)method
284
+
*[access to firebase's `storage`](http://react-redux-firebase.com/docs/storage)and `messaging` services
284
285
*`uniqueSet` method helper for only setting if location doesn't already exist
285
286
* Object or String notation for paths (`[{ path: '/todos' }]` equivalent to `['/todos']`)
286
287
* Action Types and other Constants are exposed for external usage (such as with `redux-observable`)
@@ -291,7 +292,7 @@ The [examples folder](/examples) contains full applications that can be copied/a
291
292
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.
292
293
293
294
#### What about [redux-firebase](https://github.com/colbyr/redux-firebase)?
294
-
The author of redux-firebase has agreed to share the npm namespace! Currently the plan is to make a framework agnostic version of the redux core logic of `react-redux-firebase`. Eventually `react-redux-firebase` and potentially other framework libraries can depend on that core (the new `redux-firebase`).
295
+
The author of [redux-firebase](https://github.com/colbyr/redux-firebase) has agreed to share the npm namespace! Currently the plan is to take the framework agnostic redux core logic of `react-redux-firebase` and place it into `redux-firebase`. Eventually `react-redux-firebase` and potentially other framework libraries can depend on that core (the new `redux-firebase`).
295
296
296
297
2. Why use redux if I have Firebase to store state?
Copy file name to clipboardExpand all lines: docs/api/compose.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,8 @@ Middleware that handles configuration (placed in redux's
30
30
database logging
31
31
-`config.updateProfileOnLogin`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not to update
32
32
profile when logging in. (default: `false`)
33
+
-`config.resetBeforeLogin`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not to empty profile
34
+
and auth state on login
33
35
-`config.enableRedirectHandling`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** Whether or not to enable
-`config.onAuthStateChanged`**[Function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function)** Function run when auth state
-`updateProfileOnLogin`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to update
65
66
user profile when logging in.
67
+
-`resetBeforeLogin`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to reset auth
68
+
and profile when logging in (see issue #254 for more details).
66
69
-`enableRedirectHandling`**[Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)**`true` Whether or not to enable
67
70
redirect handling. This must be disabled if environment is not http/https
Copy file name to clipboardExpand all lines: docs/roadmap.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,13 +29,13 @@
29
29
*None Yet Planned*
30
30
31
31
#### Features
32
-
*Config option for populated items updating when changed - [#69](https://github.com/prescottprue/react-redux-firebase/issues/69)
32
+
*`preserveOnLogout` to preserve some data on logout (already supported in v2.0.0)
33
33
* Population of ordered data (possibly `populatedOrderToJS`) - [#239](https://github.com/prescottprue/react-redux-firebase/issues/239)
34
+
*`childAlias` to store populate result on another parameter - [#126](https://github.com/prescottprue/react-redux-firebase/issues/126)
35
+
*`waitForPopulate` option to allow data to be returned before populated data as in becomes available. As of `v1.4.0-rc.2`, populate only sets `isLoaded` to true after all children are loaded, `waitForPopulate` would make this optional - [#121](https://github.com/prescottprue/react-redux-firebase/issues/121)
36
+
* Config option for populated items updating when changed - [#69](https://github.com/prescottprue/react-redux-firebase/issues/69)
37
+
* Improved support for batching of UI updates as the result of a database "array" loading - [#212](https://github.com/prescottprue/react-redux-firebase/issues/212)
34
38
* Expose whole Firebase instance (warning: Using Firebase instance methods will not dispatch actions or update redux state)
35
-
* Config option to not remove all data on logout (potential config syntax: `preserveOnLogout: ['todos']`)
36
-
* Integration for [`react-native-firebase`](https://github.com/invertase/react-native-firebase) for using Firebase native modules instead of JS library (allowing for instance to be passed in). The syntax may be similar to [`v2.*.*` since it is already supported](http://docs.react-redux-firebase.com/history/v2.0.0/docs/recipes/react-native.html#native-modules).
37
-
* Setting that allows for `waitForPopulate` to be turned off (i.e. return populated data as in becomes available). As of `v1.4.0-rc.2`, populate only sets `isLoaded` to true after all children are loaded, `waitForPopulate` would make this optional - [#121](https://github.com/prescottprue/react-redux-firebase/issues/121)
38
-
39
39
40
40
#### Enhancements/Fixes
41
41
* Fix `TypeError: Converting circular structure to JSON` (through update of firebase version) - [#230](https://github.com/prescottprue/react-redux-firebase/issues/230)
* Support for universal environments (i.e. no `next` function) - [#199](https://github.com/prescottprue/react-redux-firebase/issues/199)
53
+
* Option to clear redux data on `firebaseConnect` unmount - [#55](https://github.com/prescottprue/react-redux-firebase/issues/85)
53
54
54
55
## Upcoming Major Version (`v2.0.0`)
55
56
@@ -72,10 +73,9 @@
72
73
*`react-native` index file referenced in `package.json` that makes it no longer necessary to pass `ReactNative` in config
73
74
*`AuthRequired` decorator (or decorator factory) that forces auth to exist before rendering component
74
75
* Support native modules through [`react-native-firebase`](https://github.com/invertase/react-native-firebase) - [#131](https://github.com/prescottprue/react-redux-firebase/issues/131)
76
+
* Detect Non-HTTP environments (such as with SSR) so that `enableRedirectHandling: false` is not required in config
75
77
* Track online users and sessions by passing `presence` config option
76
-
77
-
#### Enhancements/Fixes
78
-
* Implement [`firebase-server`](https://github.com/urish/firebase-server) for tests instead of using demo firebase instance
78
+
* Support passing Firebase app passed instead of full firebase lib (pass around a smaller object) - [#249](https://github.com/prescottprue/react-redux-firebase/issues/250), [#250](https://github.com/prescottprue/react-redux-firebase/issues/250)
79
79
80
80
#### Under Consideration
81
81
* Allowing `presence` setting to accept a function for dynamically building presence path based on auth
0 commit comments