function handleEvent(state, action) {
	const loadingKey = getStepperKey(action);
	const loadingResource = get(state, [loadingKey], {});
	const steps = get(loadingResource, 'steps', []);
	if (!Stepper.isStepsLoading(steps)) {
		return state;
	}
	const isErrorTriggered = !!steps.find(step => isInStepAttribute(step.failureOn, action.event));
	let newSteps;
	if (isErrorTriggered) {
		newSteps = getNewStepsWithError(steps, action);
	} else {
		newSteps = steps.map(step => mapStepWithNoError(step, action));
	}

	return {
		...state,
		[loadingKey]: { ...loadingResource, steps: newSteps },
	};
}
/**
 * This function change the status of the steps in order to reflect the event
 * @param {object} state redux state
 * @param {object} action the redux action
 */
This function change the status of the steps in order to reflect the event
@param {object} state redux state
@param {object} action the redux action
This function change the status of the steps in order to reflect the event @param { object } state redux state @param { object } action the redux action
function handleEvent(state, action) {
	const loadingKey = getStepperKey(action);
	const loadingResource = get(state, [loadingKey], {});
	const steps = get(loadingResource, 'steps', []);
	if (!Stepper.isStepsLoading(steps)) {
		return state;
	}
	const isErrorTriggered = !!steps.find(step => isInStepAttribute(step.failureOn, action.event));
	let newSteps;
	if (isErrorTriggered) {
		newSteps = getNewStepsWithError(steps, action);
	} else {
		newSteps = steps.map(step => mapStepWithNoError(step, action));
	}
	return {
		...state,
		[loadingKey]: { ...loadingResource, steps: newSteps },
	};
}
function handleEvent ( state , action ) { const loadingKey = getStepperKey ( action ) ; const loadingResource = get ( state , [ loadingKey ] , { } ) ; const steps = get ( loadingResource , 'steps' , [ ] ) ; if ( ! Stepper . isStepsLoading ( steps ) ) { return state ; } const isErrorTriggered = ! ! steps . find ( step => isInStepAttribute ( step . failureOn , action . event ) ) ; let newSteps ; if ( isErrorTriggered ) { newSteps = getNewStepsWithError ( steps , action ) ; } else { newSteps = steps . map ( step => mapStepWithNoError ( step , action ) ) ; } return { ... state , [ loadingKey ] : { ... loadingResource , steps : newSteps } , } ; }
This function change the status of the steps in order to reflect the event
 @param {object} state redux state
 @param {object} action the redux action
This function change the status of the steps in order to reflect the event @param { object } state redux state @param { object } action the redux action