When to use signals and when to use observables in #Angular.
There are 2 ways to create reactive bindings/variables in Angular: Observables and Signals.
If you describe in words, how your variable should express its reactivity, you'll see what you need to use: 🧵
Change Detection in Angular 🔨
- markForCheck - marks component and all ancestors as dirty -> top-down rendering is needed to bring the app to a stable state
- detectChanges - re-renders component and all its children -> If used too much can bring the app performance to its knees (because it’s sync) and in order to make it performant you need better scheduling to not block the main thread (RxAngular does this!)
- markViewDirtyFromSignal (signals) - marks view as RefreshView and all its ancestors as having child views to refresh, we benefit from this in TargetedMode where only RefreshViews are re-rendered
*re-render in Angular means bindings and expressions are checked, and if they are changed, the changes will apply to the DOM too
#angular
This may have gone unnoticed, but in the next minor of v17, we will be able to provide a RedirectFn instead of just a string in the redirectTo field in the route object 🎉
Inside the redirect fn, we can access to queryParams and pathParams, and of course, we can use the inject function to use whatever kind of dependency we need!
https://t.co/wOwg2wcR2J
#angular
📢 Critical vulnerabilities unearthed on @infomaniak’s new public #BugBounty program could earn you up to €3,500 (around $3,000)!
Launched a few days ago, the program encompasses most digital assets of the Swiss provider of sustainable cloud, streaming and web hosting services
Read more about the rewards, rules, scopes and qualifying vulnerabilities for Infomaniak’s new public Bug Bounty program here 👉 https://t.co/TdBwUT3wJx
Papa, à quoi ça sert un EPR ?
Moyennes des émissions de 🏭CO2 en g/kWh pour la consommation ⚡️électrique en 🇫🇮Finlande, du 01/05 au 14/08 :
2019 : 128.77
2020 : 101.53
2021 : 119.55
2022 : 93.91
2019 <-> 2022 : 110.94
2023 : 45.25
#stats
Vous vous rappelez de cette brillante démonstration de Franck Lepage qui avait bluffée tout un plateau ?
Le pire c'est que ça ressemble à s'y méprendre aux discours ponctués d'éléments de langage orwelliens des macronistes 😅