I don't know how to pass 'profile' or 'auth' props to firestoreConnect() function in order to query collections or documents based on user id or some other key (my code snippet is below).
i can access both 'auth' and 'profile' objects inside my jsx code but I can't find a way to use them in firestoreConnect() function (I'm getting an error: TypeError: Cannot read property 'uid' of undefined
). if I hardcode some uid then all works fine but I can't pass it as props value.
any suggestion is highly appreciated!
export default compose(
firebaseConnect(),
firestoreConnect(props => [{ collection: 'projects', where: [['uid', '==', props.auth.uid]] }]), <<--THIS LINE DOES NOT WORK
connect((state, props) => ({
projects: state.firestore.ordered.projects,
profile: state.firebase.profile,
auth: state.firebase.auth,
}))
)(Projects);