2min chapter

Syntax - Tasty Web Development Treats cover image

Supper Club × Qwik framework from Miško Hevery, the Creator of Angular

Syntax - Tasty Web Development Treats

CHAPTER

JavaScript - How to Serialize Closures

The on-click listener has to get moved out. The thing that quick-likes you do is to serialize closures. It serializes on a server a closure that has a particular state with whatever the counter happens to be and also a reference to another function which is the set count equivalent. So when I hand you back a function, that function acts as if it had lexically scoped, captured everything in the system. That's just JavaScript. We can really load that, right?

00:00

Get the Snipd
podcast app

Unlock the knowledge in podcasts with the podcast player of the future.
App store bannerPlay store banner

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode

Save any
moment

Hear something you like? Tap your headphones to save it with AI-generated key takeaways

Share
& Export

Send highlights to Twitter, WhatsApp or export them to Notion, Readwise & more

AI-powered
podcast player

Listen to all your favourite podcasts with AI-powered features

Discover
highlights

Listen to the best highlights from the podcasts you love and dive into the full episode