This chapter explores the use of async local storage for context and middleware in frameworks, highlighting Next.js and Cloudflare Workers as examples of frameworks that have implemented this feature to enhance accessibility and pass values between functions.
In this Hasty Treat, Scott and Wes talk about AsyncLocalStorage, why more frameworks aren’t using it yet, some examples, as well as some footguns.
Show Notes
- 00:22 Welcome
- 01:44 What is AsyncLocalStorage?
- 03:14 What is context?
- 07:49 Why aren’t more frameworks using AsyncLocalStorage for context for middleware?
- 10:16 Examples of usage
- 14:20 Footguns
Tweet us your tasty treats