2 ms·
That'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 fin
by satvikpendem 3y ago
That'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...