I created a selector that is composed of two other selectors:
export const getAvailableFilters = createSelector(
getOpenedFilterMenu,
isSaleCategory,
(filterMenu, isSale) => {
// .... doing stuff
},
);
The getOpenedFilterMenu
as well as isSaleCategory
depend on the redux state and a component prop, but they depend on different props.
When I try to to access the selector like this getAvailableFilters(state, ownProps.streamId, activeCategory.id)
the TypeScript Compiler throws an error that the type of the first parameter doesn't match.
When I am removing the isSaleCategory
selector from the input selectors list, TS doesn't complain. Any idea why that is?
How do I compose selectors that have different depending props?