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 treats734: HTMX Web Apps with Carson Gross
733: Egress, scraping, Safari EU changes, is SetInterval worth it?
732: Stop going to Spam: DMARC, SPF and DKIM Explained
731: Client side security, XSS attacks & CSP with Stripe’s Alex Sexton
730: Own Your Own PaaS
729: CSS Native @scope
728: AI Superpowers with Kevin Hou and Codeium
727: How to Code: Opinionated TypeScript Stack + Tooling Choices Explained
726: Is HTMX a Joke?
725: Safari is the New Chrome - Jen Simmons of Apple
724: Potluck: Is Virtual DOM Bad?
723: Svelte 5: Speed Simplicity Size
722: Next Level Web APIs. Bluetooth, File Access, Thomas Steiner - Project Fugu
721: You should learn Drizzle, the TypeScript SQL ORM
720: Where Does Time Come From?
719: Fullstack TypeScript Apps with No Build Step?! with Brian LeRoux
718: React Server Components
717: How to be Productive
716: JS Perf Wins & New Node.js Features with Yagiz Nizipli
715: Google & MS Duopoly, Frontend to Fullstack, Where to Put Business Logic + more(Potluck)
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