Hacker News new | ask | show | jobs
by 3np 448 days ago
> I would argue if you're trying to chain middleware or communicate between middleware, you're already holding it wrong.

I haven't kept up with Next.js idioms but in generat that's what middleware is for. It's implied in the name. Middleware-chaining is a common idiom.

It's the littke details that Next.js middleware intercommunicate over HTTP headers (?!) that makes it a different pattern.