Angular - Performance Optimization
Consider the following Angular component snippet:
What will Angular do when this update occurs with the
items = [
{ id: 10, name: 'X' },
{ id: 20, name: 'Y' },
{ id: 30, name: 'Z' }
];
trackById(index: number, item: any) { return item.id; }
// Update
items[1] = { id: 20, name: 'Y Updated' };What will Angular do when this update occurs with the
trackById function in place?