Syntax - Tasty Web Development Treats
Technology
In this Hasty Treat, Scott and Wes talk about whether decorators are finally here, what the uses cases are for decorators, how to define a decorator, and what auto accessor is.
Show Noteson classes
@loggged class C {}on fields
class C { @logged x = 1; }Auto Accessor
class C { accessor x = 1; }sugar for below
class C { #x = 1; // # means private get x() { return this.#x; } set x(val) { this.#x = val; } }Can be decorated and decorator can return new get and set and init functions
function logged(value, { kind, name }) { if (kind === "accessor") { let { get, set } = value; return { get() { console.log(`getting ${name}`); return get.call(this); }, set(val) { console.log(`setting ${name} to ${val}`); return set.call(this, val); }, init(initialValue) { console.log(`initializing ${name} with value ${initialValue}`); return initialValue; } }; } // ... } Tweet us your tasty treats774: Promise Flow Control, Concurrency, Libraries, TypeScript and Deferreds - Part 3
773: React Native with Robin Heinze
772: React Server Components with PHP, Selling Accessibility, WTF is Cloudflare + more
771: Promises: Error Handling, Aborts, and Helper Methods - Part 2
770: Design Systems With Brad Frost (Rereleased)
769: React Miami Live Show
768: React 19 is here!
767: Local First and TypeScript’s Missing Library with Johannes Schickling
766: React Server Components: Form Actions + Server Actions
765: JS Promises Fundamentals - Part 1
764: Biome JS with Emanuele Stoppa
763: Web Scraping + Reverse Engineering APIs
762: What to Steal. Finding Inspiration in Web Development
761: Cloudflare Analytics Engine, Workers + more with Ben Vinegar
760: Pro VSCode Setups
759: How to Easily Explore Coding Ideas
758: Web Awesome with Konnor Rogers + Cory LaViska
757: Potluck: Is Gatsby Dead? Shadow Dom, AI Summaries, Self Hosting + More
756: CSS Is Getting Mixins + Functions
755: Chrome Extensions and Ad Blockers VS Google with Oliver Dunk
Create your
podcast in
minutes
It is Free
Insight Story: Tech Trends Unpacked
Zero-Shot
Fast Forward by Tomorrow Unlocked: Tech past, tech future
The Unbelivable Truth - Series 1 - 26 including specials and pilot
Acquired