Excellent post on JS optimisation, Why Typescript, Angular + Wiz, EU and Cookies, use of LocalStorage, React State libraries and W3C work on Neural Network API.
Excellent post with many examples and a detailed explanation of how to keep your code fast. There is no cheating on Big O; unfortunately, the functional approach is not the fastest in JavaScript. That doesn’t mean we need to rewrite every map() with a loop, but it is good to know the difference.
https://romgrk.com/posts/optimizing-javascript
Nice without-hype post on the reasoning for using TS.
https://www.epicweb.dev/typescript-what-s-the-point
Angular announce merge with Wiz (Google’s internal framework)
https://twitter.com/sarah_edo/status/1770478763253379488
A different perspective on cookie banners, or apparently myth about forced from EU cookie banners.
https://www.bitecode.dev/p/there-is-no-eu-cookie-banner-law
Excellent summary of when to use, not to use and what to use instead of LocalStorage.
https://rxdb.info/articles/localstorage.html
https://heydonworks.com/article/offloading-javascript-with-custom-properties/
https://twitter.com/housecor/status/1768997355779428678
There are many React state libraries, so it’s hard to choose between them.
Think in categories. Many are similar. Six categories:
1. Route state Tanstack router loaders, Next.js RSC fetch results - Data is fetched and cached when a route loads.
2. Remote state Tanstack query, swr, RTK Query, Apollo - Data is fetched and cached when a component loads.
3. Atomic Recoil, Jotai - Mutable stores (called “atoms”) can be composed. Optimise renders via atom dependency (Jotai), or via string key (Recoil). State is inside React.
4. Unidirectional Redux, Zustand - Immutable store. Dispatch actions to change data. Optimise renders via selectors. State is outside React.
5. Proxy Mobx, Valtio - Mutable state. Wrap your state in a proxy, so renders are automatically optimised. Valtio uses a hook. Mobx uses an HOC. State is inside React.
6. State machine XState - Enforce state transition rules, and visualise state via state charts. State is outside React.
https://dbushell.com/2024/03/10/css-button-styles-you-might-not-know/
https://webkit.org/blog/15190/implementing-vertical-form-controls/
https://blog.pragmaticengineer.com/the-ai-developer/
This API would define an ML abstraction layer without being tied to platform-specific capabilities. There are loads of use cases, such as face recognition, semantic segmentation, text-to-image, emotional analysis, and speech recognition, to name a few.
Comment on Mastodon