Тёмный

Angular Zoneless: Transform Your Apps with This New Feature | Angular 18  

Code with Yogesh
Подписаться 136
Просмотров 58
50% 1

#angular #angular_developer #angulartraining
Angular has always relied on Zone.js to know when something changed, and we can say that it has been the only framework that worked like this.
Why use Zoneless?
The main advantages to removing ZoneJS as a dependency are:
Improved performance: ZoneJS uses DOM events and async tasks as indicators of when application state might have updated and subsequently triggers application synchronization to run change detection on the application's views. ZoneJS does not have any insight into whether application state actually changed and so this synchronization is triggered more frequently than necessary.
Improved Core Web Vitals: ZoneJS brings a fair amount of overhead, both in payload size and in startup time cost.
Improved debugging experience: ZoneJS makes debugging code more difficult. Stack traces are harder to understand with ZoneJS. It's also difficult to understand when code breaks as a result of being outside the Angular Zone.
Better ecosystem compatibility: ZoneJS works by patching browser APIs but does not automatically have patches for every new browser API. Some APIs simply cannot be patched effectively, such as async/await, and have to be downleveled to work with ZoneJS. Sometimes libraries in the ecosystem are also incompatible with the way ZoneJS patches the native APIs. Removing ZoneJS as a dependency ensures better long-term compatibility by removing a source of complexity, monkey patching, and ongoing maintenance.

Опубликовано:

 

5 июл 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии    
Далее
Dependency Injection, The Best Pattern
13:16
Просмотров 762 тыс.
What’s new in Angular v18
20:08
Просмотров 104 тыс.
Navigating SEO and AI
25:40
Просмотров 11
Node.js - Top 100 Interview Questions and Answers
3:29:13