Is your feature request related to a problem? Please describe.
It seems we can reduce time when implementing binary search when finding registered actions.
const middleware: any =
.filter(({ type }) => {
if (config.isDebugContext) {
const time = formatTime(new Date());
console.group();
console.log(`${action.type} %c@`, timeStyles, time);
console.log(
'%c action ',
actionTitleStyles,
JSON.stringify(action)
);
console.groupEnd();
}
if (type === action.type) {
return true;
}
// then check if listener type is array and has action.type
if (type.constructor === Array && type.indexOf(action.type) > -1) {
return true;
}
return false;
})
.map((listener) => listener.listener(action));
}
Is your feature request related to a problem? Please describe. It seems we can reduce time when implementing binary search when finding registered actions.