Open satyendrasingh8 opened 3 years ago
const mapStateToProps = (state) => { console.log(state) return { projects:state.firestore.ordered.projects } }
export default compose( connect(mapStateToProps), firestoreConnect([ { collection: 'projects' },
]) )(HomeContent)
error:
TypeError: Cannot read property 'dispatch' of null (anonymous function) D:/webserv4u/src/firestoreConnect.js:113 110 | {(_internalFirestore) => ( 111 | <FirestoreConnectWrapped 112 | {...props}
113 | dispatch={_internalFirebase.dispatch} | ^ 114 | firestore={_internalFirestore} 115 | firebase={_internalFirebase} 116 | />
Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?
Could you prove a full repro including setup? Seems like firebase instance isn't being picked up
Jump to using hooks... useFirestoreConnect() from 'react-redux-firebase' useSelector() from 'react-redux'
const mapStateToProps = (state) => { console.log(state) return { projects:state.firestore.ordered.projects } }
export default compose( connect(mapStateToProps), firestoreConnect([ { collection: 'projects' },
]) )(HomeContent)
error:
TypeError: Cannot read property 'dispatch' of null (anonymous function) D:/webserv4u/src/firestoreConnect.js:113 110 | {(_internalFirestore) => ( 111 | <FirestoreConnectWrapped 112 | {...props}
Which versions of dependencies, and which browser and OS are affected by this issue? Did this work in previous versions or setups?