Structured patch emitted by editIngredients, replaceAllMatchingFormIngredients,
and addOrMergeIngredient so the caller (the ingredient field-array hook)
can apply the change via the RHF field-array API:
merge: fieldArray.update(intoIndex, row) + fieldArray.remove(removeIndex) —
collapse a duplicate row into another.
remove: fieldArray.remove(index) — drop a row (dismissed from queue).
append: fieldArray.append(row) — add a new row at the end.
Mass setValue('recipeIngredients', next) writes are gone: the caller
touches only the slots that actually changed, so sibling rows retain
object identity and do not re-render.
Structured patch emitted by
editIngredients,replaceAllMatchingFormIngredients, andaddOrMergeIngredientso the caller (the ingredient field-array hook) can apply the change via the RHF field-array API:replace:fieldArray.update(index, row)— single-slot rewrite.merge:fieldArray.update(intoIndex, row) + fieldArray.remove(removeIndex)— collapse a duplicate row into another.remove:fieldArray.remove(index)— drop a row (dismissed from queue).append:fieldArray.append(row)— add a new row at the end.Mass
setValue('recipeIngredients', next)writes are gone: the caller touches only the slots that actually changed, so sibling rows retain object identity and do not re-render.