That actually makes total sense and one shouldn't just use trackBy religiously (as any other recommended "best practice"), but rather consider each iterable use case separately.
There are use cases though where absence of trackBy can cause huge performance drops. For instance when one iterates over component instances that have some costly calculations inside (triggered in ngOnInit, for instance). If these calculations don't need to be triggered if nothing changes for a specific item, trackBy will save a ton of potentially lost milliseconds.
So salt is the key, as always - you should always take everything with a grain of it.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
That actually makes total sense and one shouldn't just use
trackBy
religiously (as any other recommended "best practice"), but rather consider each iterable use case separately.There are use cases though where absence of
trackBy
can cause huge performance drops. For instance when one iterates over component instances that have some costly calculations inside (triggered in ngOnInit, for instance). If these calculations don't need to be triggered if nothing changes for a specific item,trackBy
will save a ton of potentially lost milliseconds.So salt is the key, as always - you should always take everything with a grain of it.