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

I have mixed emotions on this framework. If you're doing a simple project, Next is the best around. Also great for marketing pages, etc. But if you have a more sophisticated app, with an API, page routes that need to toggle based on cookies, etc, then you have to integrate something like Express. I've done this several times with Next, and it just doesn't pay off. I've also tried to use it at work, but it changes rapidly, and it'd be too much to expect engineers who aren't keeping up with everything on the clientside to know what to do.

I feel like there's a need for something between roll-your-own and what vercel is offering.



I assume you're referring to what Next describes as a "Custom Server", e.g. taking over the server-side control flow.

Personally, I keep Next stock for the frontend, and just write an entirely separate backend/API server. I would want to do that in any event, just to achieve separation of concerns and avoid lock-in.


Next.js has been very good for not introducing breaking changes in my experience (especially for the JavaScript ecosystem). The changes are more along the lines of lots of new and useful things (e.g. image optimisation) as opposed to problematic maintenance issues.

I agree cookies can be a bit awkward with Next but I've always found a way around.


Would a minimalist framework like mithril.js fill that gap? I've had a pretty good experience when using it for some small to mid sized projects. Since its on the simple side, the updates are infrequent and have been pretty painless to keep up with.


Why do you have to integrate with Express? Genuinely asking – that wasn't my impression.


I think he means if you want to offer React server side you will need some-sort of web framework to serve it. Usually that's Express or Fastify or something like that.


Next.js does server-rendering and has API routes built-in. No need for Express or Fastify unless you like the DX of those frameworks better.


The Parent parent was talking about if you don’t use Next and want a more sophisticated setup then then those are alternatives.

The parent then asked why do you need to integrate [react] with Express and my answer was if you want to do server side (not using Next)


React was not even mentioned in the thread. OP mentioned integration Next with Express, not React.

Using Express and Next together is relatively common (or at least used to be): https://github.com/shdnx/next-express


Do you mind enumerating the specific pain points?

Routing seems like the biggest limitation, but it's a trade off to use their file-based routing which has it's pros too. This precludes page transitions unless you do some really ugly work arounds.


Yeah, I think it's going down the VC wormhole right now. It was a fantastic microframework for doing a few core tasks extremely well. Creating a fully-managed hosting platform is a good revenue stream to support the development. Adding analytics and commerce with vendor tie-ins seems like serious mission creep.




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

Search: