as you can see I have to destruct the getters which I need to sum them and get how much income they have.
here is an example code this is a getter in Vuex store, but this is not important it's rather related to javascript and not vue itself.
sumIncomes: (
{
incomeMonthlyNet,
incomePension,
incomeChildBenefit,
incomeChildSupports,
incomeSpousalMaintenance,
incomeParentalBenefit,
incomeSecondaryWork,
incomeSelfEmployedWork,
incomeMiniJob,
incomeSupplementaryPension,
incomeRental,
}
) => {
return (
incomeMonthlyNet +
incomePension +
incomeChildBenefit +
incomeChildSupports +
incomeSpousalMaintenance +
incomeParentalBenefit +
incomeSecondaryWork +
incomeSelfEmployedWork +
incomeMiniJob +
incomeSupplementaryPension +
incomeRental
)
},
this don't seem elegant at all, but I suddenly couldn't find a better way for this (if I could store for example the destructed object in a variable then I could play with Object.values and just reduce it but I don't know of such)
Thanks for your help ;)