In which scenario is it NOT recommended to use ChangeDetectionStrategy.OnPush?
- When a component has complex view logic with many nested components
- When a component is stateful and has user interactions triggering updates
- When a component relies on frequent data updates from external sources
- When optimizing for performance is a top priority
ChangeDetectionStrategy.OnPush is not recommended when a component relies on frequent data updates from external sources because it can lead to manual triggering of change detection, reducing the benefits of this strategy. It's more suitable for components with infrequent updates or performance optimization.
Loading...
Related Quiz
- You're building an e-commerce application and want to navigate the user to a "Thank You" page after a successful purchase. Which Angular feature would be most appropriate to use for this type of navigation?
- To capture all undefined routes and redirect them, you would use the ________ path in Angular's routing configuration.
- You're building a carousel component that requires initialization logic after its views are rendered. Which lifecycle hook would be most appropriate for this?
- Which class in Angular's Reactive Forms represents a group of FormControl instances?
- Which lifecycle hook is called once when the component is initialized?