When using OnPush change detection strategy, what can cause a component to be checked, besides changes to its input properties?
- Asynchronous HTTP requests.
- Changes in the component's internal state.
- Changes in the global application state managed by Redux.
- Events triggered by user interactions.
In Angular, when using the OnPush change detection strategy, a component will be checked for updates not only when its input properties change but also when events triggered by user interactions occur. This is because user interactions can lead to changes in a component's view, and OnPush checks for such changes to provide more efficient and responsive updates.
Loading...
Related Quiz
- Which is NOT a lifecycle hook in Angular?
- In template-driven forms, the ______ directive is used to bind an input field to a property in the component's class.
- In Angular's reactive forms, the method used to mark a control as touched is called ______.
- Which option is NOT a valid view encapsulation mode in Angular?
- What tool is responsible for executing tests in a browser when testing Angular applications?