2
Hello, I have a repeating structure where a pipe filter can be applied.I have read that trackBy can help performance because it does not render the DOM unnecessarily.
I put it in my component:
trackByFn(index, item) {
return item.id; //Aplicado trackbyfn para melhorar performance do *ngFor
}
In my template:
<tr *ngFor="let calculo of calculos;let m = index; trackBy: trackByFn" class="table-line">
Am I doing it correctly? Have to pass some specific value to the trackby or just pass the function is enough?