we recently moved to reselect lib. so we have mixed data structure in mapStateToProps.
I use createStructuredSelector as next, and here is the problem:
const mapStateToProps = state => ({
someProp: state.someProp,
...createStructuredSelector({
pending: selectIsPending_1 || selectIsPending_2,
})(state)
})
selectIsPending_1 returns true only during initial load. Later - always false.
selectIsPending_2 is never reached,
so in result I get always false in pending prop
How can I use this OR operator in this case?
as a workaround, inside createStructuredSelector:
pending: () => selectIsPending_1(state) || selectIsPending_2(state),