1

コンポーネントにプリミティブな値バインディングしかなく、ChangeDetectionStrategy.OnPush を使用する場合、パフォーマンス上の利点はありますか? それとも、この状況にはおそらくいくつかの欠点がありますか?

使用例:

@Component({
  selector: 'my-component',
  templateUrl: './my-component.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush
})
export class MyComponent {
  @Input() title: string;
  @Input() count: number;
}
4

1 に答える 1