Reputation: 21
im using react-redux-firebase
with populate
method to mix data from collection and everything fine except i can't using createStructuredSelector
with mapStateToProps
from redux because createStructuredSelector replace it so i looking for solution how to combine this to things
const mapStateToProps = (state: any) => {
const items = populate(state.firestore, 'Skill', populates);
const seletors = createStructuredSelector({
loading: makeSelectFSCollectionStatus('requesting', COLLECTION),
skills: makeSelectFSCollectionOrdered(COLLECTION),
});
return seletors;
}
i need to insert items
into seletors
somehow
Upvotes: 0
Views: 47
Reputation: 21
found solution
const mapStateToProps = (state: any) => {
const items = populate(state.firestore, 'Skill', populates);
const seletors = createStructuredSelector({
loading: makeSelectFSCollectionStatus('requesting', COLLECTION),
skills: makeSelectFSCollectionOrdered(COLLECTION),
});
const t: any = seletors(state);
t.items = items;
return t;
};
Upvotes: 0