Here are all the actions and explanation of each of them to functions as a guide.
dietTableActions
- This are the main and simplest actions for dietTable component. Simple things that just requires a return of state or simply modify the state.
dietTableCalcule
- This functions receives a nutrients array and a multiplier and returns the array of the same nutrients but with the amount multiplied but the modifier passed as a parameter.
foodCardActions
- Here we have simple actions to modify the state with no much logic on them.
getIdLocal
- Needs an update to document
traerIdFoodInfo
- This function receives an ID and returns all the info from the USDA API
traerInfoReporteFinal
- This function is for the final report that the app can provide. It receives an array of ids and return an array of objects with the data of all the food.
traerItemsFoodCard
- It receives a string of terms to search in the USDA API. It returns an array with all the data of those foods.