Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

state.firestore.ordered.projects always getting null result #1056

Open
satyendrasingh8 opened this issue Jan 23, 2021 · 2 comments
Open

state.firestore.ordered.projects always getting null result #1056

satyendrasingh8 opened this issue Jan 23, 2021 · 2 comments

Comments

@satyendrasingh8
Copy link

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?

@prescottprue
Copy link
Owner

Could you prove a full repro including setup? Seems like firebase instance isn't being picked up

@bk973
Copy link

bk973 commented Feb 16, 2021

Jump to using hooks...
useFirestoreConnect() from 'react-redux-firebase'
useSelector() from 'react-redux'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants