4 ms·
A fresh install of NextJS is roughly 150MB. You realise that's mostly code that all needs to work right?
by password54321 3y ago
A fresh install of NextJS is roughly 150MB. You realise that's mostly code that all needs to work right?
- satvikpendem 3y agoThat's all on the backend so it doesn't really matter to me as long as no JS is sent on the frontend. For the benefits NextJS gives me, like TypeScript, I'm fine with that.
- e111077 3y agoIn that case why not just SSR lit on the backend and send that? It sounds like an unfair criticism otherwise
- robertoandred 3y agoIt's easy to add interactivity to a NextJS site when you need it.
- e111077 3y agoLikewise with Lit, but that is besides the criticism that he was making earlier
- satvikpendem 3y agoI have the full React framework and ecosystem if I so choose to use it. For example, I could use something like react-three-fiber to add 3D or Framer Motion to add animations yet fall back to not having those when JS is disabled. Sure you could do the same in Lit but those libraries aren't present or as robust as in React.
- MatthiasPortzel 3y agoNextJS sends all JS to the frontend even if it's static and server rendered. It renders once on the server, sends a React+JS bundle to the client, and re-renders the whole page on the client (which is exactly the same). As far as I could tell, there's no mechanism for Next.JS to say "this isn't dynamic" and send only HTML content. If there's a setting I missed, feel free to let me know.
- lioeters 3y ago> It renders once on the server, sends a React+JS bundle to the client, and re-renders the whole page on the client (which is exactly the same) The new paradigm in Next.js is to have "server components" by default, which only render static HTML on the server side; and opt-in to "client components", which render on both server and client. > With Server Components, the initial page load is faster, and the client-side JavaScript bundle size is reduced. The base client-side runtime is cacheable and predictable in size, and does not increase as your application grows. Additional JavaScript is only added as client-side interactivity is used in your application through Client Components. https://nextjs.org/docs/getting-started/react-essentials#server-components https://nextjs.org/docs/getting-started/react-essentials#ser...
- robertoandred 3y agoNext doesn't ship 150MB of JavaScript to browsers...
- meowtimemania 3y agoAn installation of chrome is roughly 1,500mb. You realize that's mostly code that all needs to work right?
- silentprog 3y agochrome and nextjs do not share a use case. Whereas chrome is a web browser nextjs is a framework for building web applications.
- password54321 3y agoYeah and an operating system has 10s of millions of lines of code. Does that mean everything else comes without a cost? Also point here is you got options for a much lighter framework, which you bluntly missed.
- DangitBobby 3y agoThey probably didn't miss it, more likely haven't been impacted by the sheer number of dependencies in Next js. I know I haven't.
- wg0 3y ago> A fresh install of NextJS is roughly 150MB. You realise that's mostly code that all needs to work right? Really??
- DangitBobby 3y agoAnd work it does!