You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Best practices for a clean and performant Angular application
1. trackBy
When an array changes, Angular re-renders the whole DOM tree. But if you use trackBy, Angular will know which element has changed and will only make DOM changes for that particular element.
2. const vs let
3. Pipeable operators
4. Isolate API hacks
5. Subscribe in template
6. Clean up subscriptions
7. Use appropriate operators
8. Lazy load
9. Avoid having subscriptions inside subscriptions
10. Avoid any; type everything;
11. Make use of lint rules
12. Small reusable components
13. Components should only deal with display logic