items.map((item, index) => (
<ItemReturnFeedback
anchorText={additionalFeedbackText}
updateParentState={(feedback) =>
updateFeedbacks(index, feedback)
}
defaultText={feedbacks[index]}
/>
)
I want to wrap the callback function for prop updateParentState with useCallback so that the component can be memoized. Is there any way of doing that ?