Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return (state = initialValue || moduleStatuses.initial, { type }): State => {
switch (type) {
case types.init:
return moduleStatuses.pending;
case types.reset:
return moduleStatuses.resetting;
case types.initSuccess:
return moduleStatuses.ready;
default:
return state;
}
};
}