Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, the term "middleware" is unfortunate, this is abundantly clear.

> you wouldn't get a new tool simply because you might need it

No but you get a framework precisely because it's "batteries included": many apps will need those tools. You don’t have to use all of them, but having them available reduces friction when you do.

> If Next.js wants to allow you to run code on the edge before your app is called, that's fine, but it should be opt-in

It already is. Nothing runs at the edge unless you add a middleware.ts. You can build a full app without any middleware. I'm surprised the author of the article fails to acknowledge this, given how much time was spent on finding alternative solutions and writing the article.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: