Angular 16 is coming this May - and with new features. I'm personally excited over signals, which in a nutshell is the new way to do reactive state management. Yes, we've got RxJS but that comes with its own convolutions.
What else do we know about Angular 16?
- reactivity model and Zone.js is getting a revamp by becoming optional. Why is this good? Zone.js is great and makes Angular easy to write, it can also bloat up the entire change detection process. With Zone.js becoming optional, you now opt for RxJS or signals.
- Required component inputs will become compulsory. Basically, if marked as required, the parent must provide them - and therefore make everything explicit.
- ngcc is going. What is ngcc? In a nutshell, it's a tool used to compile pre-Ivy Angular into Ivy-compatible Angular. It came out in Angular 11.1 as a good idea but it's annoying, especially with Yarn - and it bloats the final package.
- you can now bind router info to component inputs. So instead of using ActivateRoute to get values, you can just use the inputs. Here's the discussion on it.
ngOnDestroyis tied to classes, so we can't use it on functions. This ties in with signals, which is a function and will need to be destroyed every now and then to avoid memory leaks.
esbuildwill also be supported in
ng serve. It's still experimental but performance is reported to improve by x2.
- SSR with hydration is finally coming to Angular. Yes, there's Angular Universal, but it's janky. SSR inbuilt into Angular will make life a lot easier.
In other news, I've finally finished writing a good portion of my Learn Angular series. The first 8 articles are now live with another 7 following next week. There are 4 sections in total, grouped based on conceptual complexity. Even if you don't read the entire guide, the index still makes a good roadmap to help you figure out the missing parts of your Angular knowledge. Updates will be made accordingly when Angular 16 comes out.
Here are the quick links for the foundation:
- Getting Started with Angular: A Quick Introduction
- Components and Templates in Angular
- Services and Dependency Injection in Angular
- Routing and Navigation in Angular
- Forms and Validation in Angular
- HTTP Requests and Observables in Angular
- Testing Angular Applications
- Deploying Angular Applications
And that's it for this week's update. Stay tuned for more Angular news 🎃