Hacker News new | ask | show | jobs
by doradoblank 914 days ago
NextJS is a batteries-included full-stack framework, Vite is a lot more minimal.

If you're just looking to stand up a SPA frontend for your BE, I'd recommend going with Vite, or using NextJS but going full SPA-mode.

Doing things in a properly "NextJS"y way requires buy-in to the SSR/React Server Components paradigm, which takes some time to learn, if you're used to doing things in the SPA way. You have to architect differently -- specifically the way you handle data fetching/caching. I think it's worth digging into if you have the time, just depends on your goals.

Also worth mentioning, since NextJS is full-stack, deployment will be more involved. You might not notice any pains if you use Vercel, but definitely doesn't match the simplicity of sending along a single JS bundle with Vite.