diff --git a/.babelrc b/.babelrc
index 4cbe08585..4fb3fd664 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,6 +1,8 @@
{
"presets": [
- ["minify", { "keepFnName": true }],
+ ["minify", {
+ "mangle": false
+ }],
"@babel/preset-react",
["@babel/env", {
"targets": {
diff --git a/docs/api/firebaseInstance.md b/docs/api/firebaseInstance.md
index a8a1eacf1..d4ba8ff3f 100644
--- a/docs/api/firebaseInstance.md
+++ b/docs/api/firebaseInstance.md
@@ -28,6 +28,7 @@
- [reloadAuth](#reloadauth)
- [linkWithCredential](#linkwithcredential)
- [signInWithPhoneNumber](#signinwithphonenumber)
+- [initializeAuth](#initializeauth)
- [ref](#ref)
- [database](#database)
- [storage](#storage)
@@ -456,6 +457,10 @@ authenticates and does profile handling.
Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)**
+## initializeAuth
+
+Initialize auth to work with build in profile support
+
## ref
Firebase ref function
diff --git a/docs/api/firestoreConnect.md b/docs/api/firestoreConnect.md
index 83104eab4..d128e3390 100644
--- a/docs/api/firestoreConnect.md
+++ b/docs/api/firestoreConnect.md
@@ -23,7 +23,7 @@ needing to access a firebase instance created under a different store key.
_Basic_
```javascript
-// this.props.firebase set on App component as firebase object with helpers
+// props.firebase set on App component as firebase object with helpers
import { createFirestoreConnect } from 'react-redux-firebase'
// create firebase connect that uses another redux store
const firestoreConnect = createFirestoreConnect('anotherStore')
@@ -53,7 +53,7 @@ attempting to use. **Note** Populate is not yet supported.
_Basic_
```javascript
-// this.props.firebase set on App component as firebase object with helpers
+// props.firebase set on App component as firebase object with helpers
import { firestoreConnect } from 'react-redux-firebase'
export default firestoreConnect()(SomeComponent)
```
@@ -64,13 +64,11 @@ _Basic_
import { connect } from 'react-redux'
import { firestoreConnect } from 'react-redux-firebase'
-// pass todos list from redux as this.props.todosList
+// pass todos list from redux as props.todosList
export default compose(
- firestoreConnect(['todos']), // sync todos collection from Firestore into redux
+ firestoreConnect(() => ['todos']), // sync todos collection from Firestore into redux
connect((state) => ({
- todosList: state.firestore.data.todos,
- profile: state.firestore.profile, // pass profile data as this.props.profile
- auth: state.firestore.auth // pass auth data as this.props.auth
+ todosList: state.firestore.data.todos
})
)(SomeComponent)
```
diff --git a/docs/api/withFirebase.md b/docs/api/withFirebase.md
index f96b86088..ef77fc487 100644
--- a/docs/api/withFirebase.md
+++ b/docs/api/withFirebase.md
@@ -23,7 +23,7 @@ needing to access a firebase instance created under a different store key.
_Basic_
```javascript
-// this.props.firebase set on App component as firebase object with helpers
+// props.firebase set on App component as firebase object with helpers
import { createWithFirebase } from 'react-redux-firebase'
// create withFirebase that uses another redux store
@@ -55,12 +55,15 @@ _Basic_
```javascript
import { withFirebase } from 'react-redux-firebase'
-const AddData = ({ firebase: { push } }) =>
-
+ )
+}
+
+const enhance = compose(
+ withFirebase,
withHandlers({
addTodo: props => () =>
props.firestore.add(
@@ -89,6 +95,8 @@ export default compose(
)
})
)
+
+export default enhance(AddTodo)
```
Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** Which accepts a component to wrap and returns the
diff --git a/docs/api/withFirestore.md b/docs/api/withFirestore.md
index ac933230e..04494879f 100644
--- a/docs/api/withFirestore.md
+++ b/docs/api/withFirestore.md
@@ -16,7 +16,7 @@ needing to access a firebase instance created under a different store key.
**Parameters**
- `storeKey` **[String](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** Name of redux store which contains
- Firebase state (`state.firebase`) (optional, default `'store'`)
+ Firestore state (`state.firestore`) (optional, default `'store'`)
**Examples**
@@ -50,14 +50,18 @@ from `store.firestore`, which is attached to store by the store enhancer
_Basic_
```javascript
+import React from 'react'
import { withFirestore } from 'react-redux-firebase'
-const AddTodo = ({ firestore: { add } }) =>
-