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
needsmarkForCheck
in the forms hooks
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:9 (5 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Closing since all components have been switched over now.
@jelbourn just curious as to why you guys are planning to do this?