question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make all components OnPush

See original GitHub issue
  • MdAutocomplete
  • MdAnchor
  • MdButtonToggle
  • MdOptgroup
  • MdOption
  • MdPseudoCheckbox
  • MdDatepicker
  • MdDialogContainer
  • MdExpansionPanelHeader
  • MdExpansionPanel
  • MdGridList
  • MdGridTile
  • MdGridTileText
  • MdInputContainer
  • MdList
  • MdListItem
  • MdMenu
  • MdMenuItem
  • MdSpinner
  • MdSelect
  • MdSlider
  • SimpleSnackBar
  • MdSnackBarContainer
  • MdTabBody
  • MdTabGroup
  • MdTabHeader
  • MdTab
  • MdTabNavBar
  • TooltipComponent
  • MdSidenavContainer

We should make these change incrementally, tackling one high-level component at a time (e.g., “tabs”). This will make it easier to revert in case something goes wrong after the change (and also help prevent a rebasing nightmare).

Couple of things worth noting:

  • Most components should be as simple as adding OnPush to the config. This is the case if the component just has simple inputs and outputs.
  • Anything that implements ControlValueAccessor needs markForCheck in the forms hooks

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:7
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
crisbetocommented, Sep 18, 2017

Closing since all components have been switched over now.

1reaction
alexw10commented, Jun 9, 2017

@jelbourn just curious as to why you guys are planning to do this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular OnPush Change Detection - Avoid Common Pitfalls
In this post we are going to cover some typical pitfalls where OnPush is giving unexpected results and how to fix those situations,...
Read more >
Angular Change Detection and the OnPush Strategy - Toptal
Learn how to use the OnPush Angular change detection strategy and make the most out ... All Angular apps are made up of...
Read more >
How to set ChangeDetectionStrategy.OnPush as default strategy
OnPush as default strategy for every component in my app instead of writing on every component's template changeDetection: ...
Read more >
A Comprehensive Guide to Angular onPush Change ...
We can set the ChangeDetectionStrategy of our component to ChangeDetectionStrategy.OnPush . This tells Angular that the component only depends ...
Read more >
OnPush — your new Default | by Alex Inkin | AngularWave
All you need to do is to inject the ChangeDetectorRef class and call ... Even if your component is OnPush, Zone.js will still...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found