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 treats768: 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
754: How to Level Up Your Web Development Career
753: Cache Ruins Everything Around Me
752: React vs Vue vs Angular with Corbin Crutchley
751: UI Components: ShadCN, Tailwind UI, Headless, React Aria, Radix UI
750: New CSS and JavaScript You Should Be Using
749: Coding Shopify with Anne and Trudy of Design Packs
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
Darknet Diaries