3 ms·
whats the point of using nextjs if youre not using ssr? wont CRA work fine?
by swyx 4y ago
whats the point of using nextjs if youre not using ssr? wont CRA work fine?
- leerob 4y agoMaybe they're wanting the image/font/script optimizations Next.js includes, or the other tooling it abstracts (e.g. SWC). You can use Next.js in full-SPA mode (e.g. next export) if you want. I would recommend that or Vite+React over CRA.
- satvikpendem 4y agoDo the image/font/script optimizations also work for SSG? I thought it was just for server side rendering. Also, does `next export` emit raw HMTL/CSS/JS or does it include React as the renderer as well? I seem to remember that `next export` could emit a build that (potentially) could work without JS as well, ie using React as purely a templating language rather than for logic.