6 ms·
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
by truesy 6y ago
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.
- o_____________o 6y agoWhy do you have to integrate with Express? Genuinely asking – that wasn't my impression.
- jayflux 6y agoI 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.
- makeee 6y agoNext.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.
- jayflux 6y agoThe 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)
- randomchars 6y agoReact 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 https://github.com/shdnx/next-express
- tootie 6y agoYeah, 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.
- mulholio 6y agoNext.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.
- pinum 6y agoI 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.
- acoard 6y agoDo 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.
- gkhartman 6y agoWould 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.