Not interested in the server-side stuff as I don't use JS/Node on the backend. I see that Next.js is a Node framework, so unless there's a cut down client-side only version that's useful, not sure it'll fit the bill.
I was looking at Alpine.js but it's pretty minimal, so I want something more full-featured to compare to. These headless UIs look useful, and some have React and Vue versions.
While it's true that it's a Node framework, NextJS can totally function like a client-side React framework. NextJS just bakes a lot of basic and common functionality such as routing, built-in support for CSS modules, as well as optimizations (it's not premature if it's baked in already).
The server-side mostly just takes place if you utilize the following:
- Built-in API
- Server-side Rendering
> Not interested in the server-side stuff as I don't use JS/Node on the backend. I see that Next.js is a Node framework, so unless there's a cut down client-side only version that's useful, not sure it'll fit the bill.
NextJS (and Gatsby) occupy this space between a static site and a site that is sever rendered. While the site itself is static, during the build process is when all the "server side" stuff happens.
don't be so fast to dismiss needing 'server side stuff'
one pitfall of react that it fixed for me was escaping the single page gracefully.
for example, if you want to have any other /pages that can be shared properly on facebook / get index on a search engine, then you NEED to render that on the server (can be statically generated with next.js so you still don't need a server)
doing routing with pure react is a complete headache and mess of code, plus it will not get indexed properly / look right on a search engine.
if you start with next.js, you lose none of the react functionality, add very little overhead, and can actually make a functioning website a lot more easily.
like i said, i rejected it to begin with too - but it is super useful and super easy to use. don't make my mistakes all over again!
Next.js has `next export` which generates a client-side only bundle. It's really neat, as it saves you a lot of manual setting up and maintenance of configuration files, assuming your app fits in the boundaries of Next.js's use cases - which most do.
I was looking at Alpine.js but it's pretty minimal, so I want something more full-featured to compare to. These headless UIs look useful, and some have React and Vue versions.