DEV Community

Discussion on: Simplify your Node code with Continuation Local Storage variables

renoirb profile image
Renoir Boulanger

Koa with ctx.state is unique per request per user. Look the source up, it's great. I prefer it to Express. It's actually from some folks from Express. But the API is more modern. I imagine that Express 5 (in beta?) is inspired by it

Thread Thread
miketalbot profile image
Michael John Talbot Author

Looks from the docs that you are still supposed to pass it on though? It's not a global like cls unless I'm missing something. If that's the case then you put it in cls and never pass it through function layers, callback and events etc.