4 ms·
What do you get out of Next.js over vanilla React? I've never understood why that ecosystem is so popular. Anyway though, Astro is lovely, especially for stati
by shepherdjerred 2y ago
What do you get out of Next.js over vanilla React? I've never understood why that ecosystem is so popular.
Anyway though, Astro is lovely, especially for static site generation.
- l0gicpath 2y agoThere’s a great deal of value in the “fullstack meta-frameworks” model of things. For one, using the same language on the backend and frontend is underrated feature. But Next.js is not the only option on the market, so I partially echo your sentiment, not around React SPA vs React fullstack, but around Next.js vs a half dozen better alternatives for the React ecosystem.
- root_axis 2y ago> using the same language on the backend and frontend is underrated feature. You don't need a framework for that.
- shepherdjerred 2y ago> using the same language on the backend and frontend is underrated feature I agree, but you can definitely do this without SSR or Next.JS. Common examples are tRPC, Zodios, or even just plain fetch calls with shared type definitions. - https://trpc.io/ https://trpc.io/ - https://www.zodios.org/ https://www.zodios.org/
- root_axis 2y agoEven SSR is pretty easy to do without a framework. Just render the component with react-dom/server and use hydrate on the client.
- sureIy 2y agoNot everyone wants to build a website from scratch. Most people hate build systems.
- shepherdjerred 2y agoBuilding a React app "from scratch" with Vite is this complicated: import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' export default defineConfig({ plugins: [react()], })
- addicted 2y ago> What do you get out of Next.js over vanilla React? The biggest problem is that React itself recommends against using Vanilla React. https://react.dev/learn/creating-a-react-app https://react.dev/learn/creating-a-react-app > If you want to build a new app or website with React, we recommend starting with a framework. This, frankly, is insane. The whole point of React was that it was this relatively lightweight UI library you could drop into pretty much any workflow. The fact that the React docs themselves recommend against using the React library as a library is just mind boggling but also another instance in the long history of React devs being absolutely hostile to their users.