Episode 23/01: Performance Content (Zone.js, refreshView)

ng-news - Jan 9 '23 - - Dev Community

Using Angular's source code, Corbin Crutchley explains how Zone.js works and how Angular uses it.

Next, Max Koretskyi focuses on the internal refreshView function and what tasks are necessary to render a component.

Corbin Crutchley: Angular Internals: How Reactivity Works with Zone.js

Zone.js is a key ingredient of Angular. It listens for DOM events, for ending asynchronous tasks, and kicks in Angular's change detection. With Zone.js, we don't have to explicitly tell Angular when to re-render a component.

Corbin Crutchley wrote a detailed article about that topic. He heavily uses Angular's source code and Ivy's generated code for his explanation. Starting from a single component, he walks up to the actual DOM event, which initialises the re-rendering.

Corbin explains what every frame in the stack trace is actually doing and how it fits into the big picture of change detection.

It is a wonderful article that motivates to look up the code snippets in one's own application code.

Max Koretskyi - Overview of Angular’s Change Detection operations in Ivy

And from Max Koretskyi, we got a second kind of accompanying article. Where Corbin has more of a top-down view, from the DOM Event to the component, Max focuses on the refreshView function.

It runs multiple tasks for a given component.
For example, where and when the execution of the life-cycle hooks happens. Or where and how Angular deals with the OnPush strategy.

You will most likely never deal with refreshView directly, but with that knowledge, you better understand what's going on under the hood of Angular.

Angular Gaming Show

The monthly Angular Gaming show took place, where members of the Angular team answer questions.

The main takeaways:

  • NgModules prevent the usage of Vite. Vite expects that a file change is always done "in isolation". Direct Link
  • You should favour the inject function over constructor based DI. Direct Link
  • It is theoretically possible that NgModules get deprecated in the future. But the Angular team still has to decide if and when: Direct Link

Miscellaneous

A list of popular JavaScript libraries/frameworks/tools ranked after their stars on GitHub can be found on:

2022 JavaScript Rising Stars

A complete overview of the JavaScript landscape in 2022: trends about frontend, fullstack and Node.js frameworks, React and Vue.js ecosystems, build tools, state management...

favicon risingstars.js.org

The current state of frontend development and where we are heading to from Ryan Carniato:

Minor Version Upgrades

Nx 15.4

Nx 15.4 — Vite 4 Support, a new Nx Watch Command, and more! | by Zack DeRose | Nx Devtools

Nx just had a massive release 2 weeks ago with Nx 15.3 — if you missed it be sure to check out our article featuring some huge…

favicon blog.nrwl.io

Cypress 12.3

https://docs.cypress.io/guides/references/changelog#12-3-0

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player