ng2-swipe-cards icon indicating copy to clipboard operation
ng2-swipe-cards copied to clipboard

Add ChangeDetectionStrategy.OnPush for performance boost

Open chrillewoodz opened this issue 8 years ago • 1 comments

chrillewoodz avatar May 20 '17 15:05 chrillewoodz

I'm not a huge fan of data immutability because it breaks JavaScript references. So i guess that with this change, for example: if i want to change the overlay like's color , i would have to write this.overlay = { like: { backgroundColor: '#28e93b' }, dislike: { backgroundColor: '#e92828' } }; or use a copy function from a framework in order to recreate the JavaScript object instead of just: this.overlay.like.backgroundColor = '#28e93b'; Well of course, i'm not really accustomed with immutable data, so i may be wrong. if it doesn't break anything in the way the component inputs work, i think it could be interesting to add it.

Viczei avatar May 23 '17 13:05 Viczei