export const mySelector = createSelector(
[selectorA, selectorB], // but I want selectorB or selectorC to be chosen here using logic
(foo, bar) => {
// ...
}
);
I want to conditionally use selectorB
or selectorC
when creating this selector based on the state in the store (i.e. the value returned by another selector).
How can I do this?