So i'm using this package, and want to apply this reciept to populate data from collection called 'roles' in my firestore to my firebase/profile data in redux state.
In this docs says, that my roles collection must be a sibling of users collection in firestore, but in my case it's not possible. I have different collections: Users, which stores data about users, and Roles, which stores app tree and access by roles.
How to populate data between different collections using this package? Please help me..
i'm using this code for setup:
const store = createStore(
rootReducer,
composeEnhancers(
applyMiddleware(thunk.withExtraArgument({ getFirebase, getFirestore })),
reduxFirestore(fbConfig),
reactReduxFirebase(fbConfig, {
useFirestoreForProfile: true,
userProfile: 'users',
profileParamsToPopulate: [
{ child: 'profile', root: 'roles' }, //But that's not working because roles is not sibling of users
],
attachAuthIsReady: true
})
)
)