You've noticed that a specific component in your application is being checked and re-rendered by Angular even though its input data hasn't changed. You want to optimize it so that Angular only re-renders it when the input data actually changes. What would you implement?

  • Change Detection Strategy
  • Dependency Injection
  • Pure Pipe
  • ngOnChanges Lifecycle Hook
To optimize re-rendering, you should implement a Change Detection Strategy, such as OnPush, to make Angular re-render the component only when its input data changes.
Add your answer
Loading...

Leave a comment

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