Skip to content
This repository has been archived by the owner on Dec 4, 2017. It is now read-only.

StyleGuide - In Change Detection, "Use OnPush..." #1161

Open
mgechev opened this issue Apr 25, 2016 · 1 comment
Open

StyleGuide - In Change Detection, "Use OnPush..." #1161

mgechev opened this issue Apr 25, 2016 · 1 comment

Comments

@mgechev
Copy link
Member

mgechev commented Apr 25, 2016

To be discussed.

// cc @wardbell @johnpapa


  • Use OnPush change detection strategy for pure/dumb components that accepts as input immutable data.

    Why?: Angular will optimize the performance of your application dramatically by not performing change detection over the entire sub tree with root the given pure component.

@johnpapa
Copy link
Contributor

We need one like this, but it needs more why, more avoid code and more recommendation code.

@mgechev mgechev changed the title StyleGuide - In Change Detection, "Use @HostListener..." StyleGuide - In Change Detection, "Use OnPush..." Apr 25, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants