5 ms·
You don't need Next.js – Why we migrated from Next to React
- deleted 2y ago[deleted]
- revskill 2y agoThe Next.js team keeps hiding the usefulness of React Server Component for the ease of development and Vercel deployment. It's a gatekeeper at its best. Why not exposing an API for RSC so that i can imperatively fetch a RSC page with normal fetch call ? Why hiding such a killer feature so that you don't need HTMX anymore. Also, why conventionally forcing the "RSC page" can't access the Request object in lue of caching. Instead of flexibility of a framework, you force things which users don't prioritize. Ah, one last point, file system routing without anyway to opt-out is a red flag of the architecture as well.
- leerob 2y agoRe: why can't I access request: https://nextjs.org/docs/app#how-can-i-access-the-request-object-in-a-layout https://nextjs.org/docs/app#how-can-i-access-the-request-obj... If filesystem routing isn't something you enjoy, Next.js probably isn't the right tool for you.
- hu3 2y ago> You intentionally cannot access the raw request object. However, you can access headers and cookies through server-only functions. You can also set cookies. > Layouts do not rerender. They can be cached and reused to avoid unnecessary computation when navigating between pages. By restricting layouts from accessing the raw request, Next.js can prevent the execution of potentially slow or expensive user code within the layout, which could negatively impact performance. I don't like this limiting "I know best what's good for you" attitude in my tooling. Yes limits are desirable to avoid footguns but this seems like too dumbed down of a restriction for little gain.
- citizenpaul 2y agoDo some people prefer using filesystem routing? I don't think I've used it before but it sounds clunky.
- mzronek 2y agoYou can opt out by using a single (optional) catchall route and handle the path all by yourself. This is sometimes necessary to handle CMS pages for example. Docs: https://nextjs.org/docs/app/building-your-application/routing/dynamic-routes#optional-catch-all-segments https://nextjs.org/docs/app/building-your-application/routin...
- akmittal 2y agoNextjs had become the de facto standard for writing React apps. However, things seem to have gone sideways after RSC. Not just Next, with time, React has become very confusing. Hopefully, turbopack and RSC fixes some of these issues in future.
- TekMol 2y agoAlmost all projects I see that use Next.js or React or Vue or any other heavy frontend framework/library would be better off just using a library to template things on the backend (For example Jinja). Sometimes a bit of client side rendering via EJS also makes sense. Why use a framework at all?
- ericyd 2y agoDo you feel this way about dashboard apps? The OP is about a dashboard app, and I think they are one example where the benefits of a SPA framework really do make sense. Curious if these fit into the "almost all" criteria you use.
- TekMol 2y agoWhat makes a dashboard app particularly suited to not just use simple server side and/or client side rendering but a framework?
- ericyd 2y agoI think the main thing is that the downsides of SPA frameworks are significantly mitigated in a dashboard app. Typically dashboards will be accessed on a desktop in an office setting with good internet, so initial load and asset size isn't a huge issue. Then you get benefits like client side routing which feels snappy, and live updating widgets is pretty simple. Of course it's a matter of opinion though.
- TekMol 2y agoI doubt that "client side routing" makes a site more snappy. I think what you mean is that elements shared across pages (the header, the navigation bar etc) do not have to be sent again. But those are very small anyhow. And you could bring the size down to zero by making them web components. Web components are cached along with the JS that defines them.
- 2y ago
- jbeard4 2y agoWe use nextjs because we want to optimize the page for SEO and crawlability. If you don’t need your page to be crawlable (eg a dashboard behind a login), then there’s a good chance you don’t need nextjs, and pure React will indeed be simpler.
- joshlemer 2y agoGiven how much front end has evolved over the last 15 years, is it really the case still these days that you should do SSR for SEO? That would be a strong indictment of Google and other search engines if they still so many years later are not properly crawling JS based websites wouldn't it?
- arend321 2y agoGoogle does crawl client side generated content but at a low priority and with mixed results. It's expensive and slow to render js pages so I see where they are coming from.
- linkjuice4all 2y agoUnfortunately, yes. While Google and many other search engines/crawlers can render JS it’s much faster to give them the rendered page - especially for very large sites. But page load optimization does typically bring better user engagement so it’s not just an SEO strategy.
- floydnoel 2y agoI built a small router that can use Prerender for SEO compatibility on vanilla React projects. So there are some alternatives. https://www.npmjs.com/package/routerino https://www.npmjs.com/package/routerino
- nnnnico 2y agohey thanks for linking to routerino <3, i;ve thought about using something like this for my vanilla react projects and this seems perfect. do you know what are the actual downsides for the end-user/client when compared to SSR (besides requiring client js)?
- steventruong 2y agoRelevant article: https://www.epicweb.dev/why-i-wont-use-nextjs https://www.epicweb.dev/why-i-wont-use-nextjs Discussion at the time: https://news.ycombinator.com/item?id=38018217 https://news.ycombinator.com/item?id=38018217
- leerob 2y agoThere was some incorrect information in that post, which was later followed up on by myself (I work on Next.js) – Kent linked back in his post (https://archive.leerob.io/blog/using-nextjs https://archive.leerob.io/blog/using-nextjs)
- sibeliuss 2y agoThis is so true! Our codebase got radically simpler when we did the exact same thing. And faster too, in terms of page rendering. It is very unfortunate that the whole community is being pushed onto frameworks like this unnecessarily. All most folks need is `npx rsbuild init`: https://rsbuild.dev/ https://rsbuild.dev/ (And I love that the post authors are using rspack! I read the post after posting this comment. This was our exact same process. No more overhead of next -- just used rspack/rsbuilld and a simple router and beautiful simplicity everywhere, including 10ms hot reloads)
- cess11 2y agoLiveview addresses some of the things they lost, like crawlability. https://m.youtube.com/watch?v=Qz0ZnOMaePo https://m.youtube.com/watch?v=Qz0ZnOMaePo
- nesarkvechnep 2y agoAre you really proposing for JS developers to learn another stack? Only half-joking.
- mrweasel 2y agoIt was only recently that I realised that there are developer out there who know only Javascript. That's crazy to me, it's like a language of last resort, for when you absolutely need the browser to do something it wasn't meant to do.
- cess11 2y agoIf they do they won't have to learn more, the BEAM has everything: load balancing, in-memory database, distributed inference models, agent frameworks, video streaming and pattern matching that will make Javascript array destructuring look like child's play! Though I can sympathise with wanting the simplicity of React, after all it's just a diffing algorithm and markup.
- dom96 2y agoI've built my latest project[1] with Next.js and it's often felt pretty hectic to use. App vs. pages router, accessing cookies requiring different APIs between the client-side and the server side, env vars being accessed via `process.env.NEXT_PUBLIC_*` which gets rewritten into literal value of the env var (so if you access `process.env` directly you're very confused). I guess I was hoping that I'd be able to write code which would work on either the client-side or the server-side with minimal changes. But that's not what I experienced. For what Next.js does provide, it doesn't feel worth the overhead and the learning required to do it "the Next.js way". 1 - https://onlyhumanhub.com https://onlyhumanhub.com
- 383toast 2y agoTotally agree, Next.js has so much Next-specific stuff (which also changes frequently) that I don't use it anymore.
- matt-p 2y agoThe app router is complete hell and was dog slow when it was launched as "stable/new default". Use pages and remember that env var patten and you're good.
- dom96 2y agoPages is the old thing, why would I use it? Isn't it basically deprecated by now?
- vunderba 2y agoIt might be the old thing but it's still widely supported by Next - in no small part due to the backlash over the IMHO way overengineered App Router. I still use the pages system and actually find myself increasingly moving back to just using Vite + React if I don't need access to the node-based API.
- matt-p 2y agoAgree Vite/react is a great choice too.
- YuukiRey 2y agoI work on a CMS using NextJS (PayloadCMS) and NextJS is hands down the worst piece of technology I have ever had to use.
- christophilus 2y agoI had one project that used Next. It was one of the most painful things I’ve used in my 25 year career. And if you’re on Linux, it’s dog slow when developing. Never again.
- sexy_seedbox 2y agoWorst than Drupal? Magento? Microsoft Teams?
- Alifatisk 2y agoYou know what the issue is? People are so focused on being able to scale their idea to billions of users before they even start building it. So someone today would start using Kubernetes for their website with 5 visitors. I've seen many students use Nextjs for websites that could easily be written with plain html + css, and some chart library.
- tasn 2y agoThe experience of developing a simple website using React is orders of magnitude better than using html and CSS. Reusable components, loops, and separating data from presentation go a long way even in the simplest of pages. Sure, you don't need React, you could use Jinja or any other templating library, but React is pretty good at what it does. As for Next.js, it makes it super easy to develop using React. The biggest problem with React is the JS bloat that's sent to the browser. Though as long as you do server side rendering and don't even ship the JS to the FE, Next.js is a pretty good static site generator.
- Alifatisk 2y agoI miss the old LAMP stack, good times
- Carrok 2y agoThe LAMP stack is still here, waiting for you.
- paddw 2y agoThis. It is way faster to build a decent looking prototype using JavaScript Framework Bloat than shipping something leaner. Performance and maintainability are luxuries that make sense to focus on later. This is in no way analogous to using k8s from the get go, which is a technology focused on being flexible and generic enough to maximize choice, rather than speed or developer experience. Yes, yes, I you want to make a plain HTML form its fast enough, but for a startup 99% of customers want to feel assured by it having a look and feel which simply takes too much time if you are building things up without a framework
- nickdichev 2y agoI’ve been playing around with Vike to replace a NextJS app and I’m having a good time. It gets out of my way and lets me build how I see fit.
- deanc 2y agoI hate to be blunt here but if you are complaining about 3min builds and 10s start-up times for a dev environment, you are looking at the wrong areas of optimisation.
- codehotter 2y ago? These are complete unacceptable, developer feedback loops should be measured in milliseconds not minutes.
- 12345hn6789 2y agoThese are for cloud / non local builds no? My company is pushing 10-15 minutes for cloud deployments. I'd love for 3 minutes.
- joshribakoff 2y agoIs the implication developer experience does not matter and user experience is the only thing that matters? I can improve the user experience faster and more reliably if i can iterate faster. While I wouldn’t agree with the sibling comment that says it needs to be measured in milliseconds, I will say that the faster it is, the more motivated I am to work on it as well.
- deanc 2y agoNo, but when you choose NextJS you're choosing a product and should evaluate the reasons for doing it. It's abstracting away a substantial amount of pain points in deploying and optimising react apps. The OP even talks about some of the things he's losing out on by dropping it. We spend so much time as developers moving on to the next thing, instead of shipping and worrying about a few mins of build time when deploying (which is nothing).
- tommy_axle 2y agoIt's not only a few mins when deploying. Often you want to test the production build locally and it feels like waiting forever. Especially since clicking around in an app for the dev build is slow during cold use. I think it has gotten worse as I don't remember build times taking so long in next versions 5 thru 9 or so.
- izwasm 2y agoI totally agree, but what i hate about react.js is that if you have like a big app, the routes definitions will be a nightmare, i would love to see native file routing system inside react.js
- ggregoire 2y ago> i hate about react.js is that if you have like a big app, the routes definitions will be a nightmare I'm curious how you define your routes cause I've got several big apps with lot of routes, nested routes and complex access permissions for each route and it never entered in my mind that there was anything complicated about it.
- akritrime 2y agoI am more surprised at how the general notion has shifted towards the idea that Next.js is the default starting option now. It just feels like such a drastic change to me, compared to even 2 or 3 years back (last when I paid enough attention to frontend stuff).
- chrisweekly 2y agoYeah, NextJS is very opinionated and IME (doing webdev since 1998), using Vite (and optionally React-router / Remix, for SSR etc) makes MUCH more sense.
- tengbretson 2y agoAm I the only one having a great time here? I've been using Next.js since the v14 launched and it's been great! Using RSCs, I have large portions of my app that just work even with client-side js turned off. It's like having all the simple power of a PHP app except with a nice type system and the ability to seamlessly include interactive, stateful client components at the "leaf level" of my view tree.
- actualwitch 2y agoYou don't have to lose backend/frontend logic colocation when you shed next.js, just implement your own ssr which is mostly trivial. You don't have to use server components either, you just have to guarantee that node imports get pruned from browser build, and then you can run node deps on ssr to your heart's content. I went this way in my recent pet project and not gonna lie, updating dependencies and nothing breaks feels wild after years of next/cra churn.
- dzonga 2y agoI'm grateful for rails and hotwire. completely enabled me to escape the madness that is the react ecosystem. if it's not a state management library, it's a meta framework, if it's not a metaframework, it's a data fetching library. so many choices to do one simple thing put data coming from the server on a page. then why do people need it to make complicated as if you're hatching dragon eggs with alchemy ?
- 383toast 2y agoReact for me has several large advantages (no specific order): 1. declarative dom updates is way easier than imperative 2. frontend components Additionally typescript needs a compile step anyways so it's not super complicated to just add react to it. I think many people bounced off React 5 years ago when in 2025 React apps are easy to get started with (basically no config), have negligible hot reload + build times, and largely have become a joy to use.
- owebmaster 2y ago> I think many people bounced off React 5 years ago when in 2025 React apps are easy to get started with I (and the post and many comments here) think many people are bouncing off React now, because of NextJS and Vercel.
- katspaugh 2y agoWe’re also seeing super slow dev build times with Next.js. It takes around 12 seconds for the initial page and then 2-3 seconds for other pages. I always thought it was an inherent issue in this app due to the many dependencies (9000+ modules for each page) but I’m going to try what the article suggests. Does Rsbuild or any other build tool provide an alternative to Static Site Generation with automatic code chunking? Because this part of Next.js is great. The production app is super fast to load. Edit: looks like Rspress does exactly that.
- mjAxi0m 2y agoI've been using https://perseid.dev https://perseid.dev for years, for building web apps, never had any performance issues. Only websites like e-commerce really need SSR. For all the other use cases, it's really just a fancy thing, not worth the extra development complexity and hosting costs.
- 383toast 2y agoYep nextjs doesn't really provide much for regular CRUD/SaaS apps, just use Vite react starter
- lovegrenoble 2y agoBuild time went from a couple of mins to 18 secs Why it's important for you? How many times in a day do you need to build the app?
- 383toast 2y agoif you have a build on every CI run (every commit pretty much) and a preview link, then it really adds up...
- zenethian 2y agoOK but now drop React.
- deleted 2y ago[deleted]
- deleted 2y ago[deleted]
- ggregoire 2y agoMost users don't need anything else than React with React-Router, a tool like Vite or similar for hot reload in dev and make the build, and a static hosting solution like S3 and CloudFront to host the app for peanuts.
- joshcsimmons 2y ago“We received an unexpected $2,000 bill from Vercel due to high API usage from a single user” Skill issue. Testing APIs became a nightmare, because we had a lof of server actions mixed with api routes. Sounds like you designed the app poorly. Build times got so slow it felt like watching paint dry. Heard but is there any situation where you’d a sub 3 minute deploy. Local dev was brutal - every tiny change triggered a full SSR reload. I have never noticed this as an issue across any Next app of any size that I’ve worked on. I agree that next probably doesn’t scale but it’s pretty good for 0-to-1 without having to worry about setting up routing, tailwind, basic API etc