πŸ“Š Angular
Q. What is the use of the `trackBy` function in *ngFor?
  • (A) To filter the items
  • (B) To sort the items
  • (C) To improve performance by tracking item identity
  • (D) To convert item to string
πŸ’¬ Discuss
βœ… Correct Answer: (C) To improve performance by tracking item identity

Explanation: trackBy helps Angular track which items have changed, improving rendering performance.

Explanation by: Mr. Dubey
trackBy helps Angular track which items have changed, improving rendering performance.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
45
Total Visits
πŸ“½οΈ
8 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
94%
Success Rate