Releases: prescottprue/react-redux-firebase
Releases · prescottprue/react-redux-firebase
v2.0.0 Alpha 3
- Firebase is now an external in webpack config (shrinks browser bundles)
createFirebaseInstanceis exposed at top level (for passing the name of the store for which to create thefirebaseConnectfunction)
Pre-release versions of v2.0.0 will be on @canary npm tag moving forward (npm i --save react-redux-firebase@canary)
v2.0.0 Alpha 2
Description
getFirebaseexposed to mirrorv1.*.*API - #167- Improved initialization - #170
- README Simplified
- More unit tests passing (including populate)
- Migration guide includes redux-persist example
Check List
- All tests passing
- Docs updated with any changes or examples
- Added tests to ensure feature(s) work properly
Relevant Issues
Version v1.4.3
onAuthStateChangeadded to config validation- deprecation warning added for
distpatchOnUnsetListenerconfig option (it is spelled "dispatch" i.e.dispatchOnUnsetListener)
Version v1.4.2
- Fixes an issue that when attempting to query in Internet Explorer on Windows would cause error with message "isNan is not a method of Number"
Version v2.0.0 Alpha
- 🎉 NO MORE IMMUTABLE.JS! 🎉 which means:
- no more using
pathToJS,dataToJS, orcustomToJS- see snippets below - simplified population (can easily be done manually following common redux patterns)
redux-persistis supported out of the box (no longer needdataToJS,pathToJS, orcustomToJS)
- no more using
- New Population syntax (
populateinstead ofpopulatedDataToJS) - see snippets below - Firebase instance can be passed as first argument instead of config vars (see snippets below):
- removes platform specific code while improving platform support
- allows any version of Firebase to be used
- allows
react-native-firebaseto be passed (for using native modules instead of JS withinreact-native)
- Wrapping instance with helpers which internally dispatch redux actions separated into exported function named
createFirebaseInstance - Material example uses new syntax (no helpers)
- react-native example passes in an instantiated instance of Firebase
Migration Guide
Syntax Snippets
-
No more helpers:
import { connect } from 'react-redux' import { firebaseConnect } from 'react-redux-firebase'; @firebaseConnect(['todos']) @connect( ({ firebase: { auth, data: { todos }} }) => ({ todos, // v1 would require dataToJS auth, // v1 would require pathToJS }) )
-
Passing A Firebase Instance:
import * as firebase from 'firebase/app' import 'firebase/auth' import 'firebase/database' import 'firebase/storage' const fbConfig = {} // object containing Firebase config firebase.initializeApp(fbConfig) const store = createStore( reducer, initialState, compose( reactReduxFirebase(firebase, reduxConfig), applyMiddleware(...middleware), ...enhancers ) )
-
new populate syntax:
import { connect } from 'react-redux' import { firebaseConnect, populate } from 'react-redux-firebase' const populates = [ { child: 'owner', root: 'users' } ] @firebaseConnect([ { path: 'todos', populates } // '/todos#populate=owner:users', // equivalent string notation ]) @connect( ({ firebase }) => ({ todos: populate(firebase, 'todos', populates), // used to be populatedDataToJS }) )
Version v1.4.1
Version v1.5.0 Beta 3
- Switched to using
.npmignoreinstead offilesandfilesMapfields in package.json to get typescript typings to be published - #142
Version v1.5.0 Alpha 2
- Removed
browserfield frompackage.jsonin attempt to solve - #128
Version v1.5.0 Beta 2
Version v1.5.0 Beta
- Typescript typings added - #142
- Webpack updated to version 2 (with matching changes to config)
- redux-persist recipe added to docs (uses
redux-persists-transform-immutable)