Change detection in Angular can be optimized by ensuring data structures are ________.

  • Encapsulated
  • Immutable
  • Mutable
  • Private
Change detection in Angular can be optimized by ensuring data structures are immutable. Immutable data structures ensure that when changes are made to data, a new reference is created, which helps Angular's change detection mechanism identify changes efficiently. By contrast, mutable data structures may not trigger change detection as expected.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *