After living under a rock for years*, I have been checking (not in depth) many technologies in the past few weeks: Gatsby, React, Reagent, re-frame, perun, JUXT, Cryogen, Stasis, Eleventy,… My confusion is growing exponentially**.
The objectives or I what am searching for:
- The most simple option (PD: mainly concerned with the bundling and front-end aspects).
- To generate static "single page apps", e.g. in a
static folder to commit. Pre-rendering what is possible, to keep the client load low. (PD: apparently pre-rendering should include React state hydration) - Without writing
html files if possible, hiccup looks too good to ignore it. (PD: single page but simulating several pages, by React routing). - If possible, suitable for using microservices (Jamstack fashion) to build "full apps" with the same technology†.
I think there are three main possibilities:
- There is some equivalent to Gatsby that I have overlooked and would make everything like a piece of cake.
- There is no equivalent to Gatsby because it is state of the art in JavaScript and ClojureScript will be behind for some time, but I can still make components and most of the "stuff" in CLJS and use it from JS. This may effectively double the work for small things, and I guess I would stick to JavaScript in that case, but it is good to know it is there as an option.
- There is something better than Gatsby because the CLJS world is beyond the peasantries of the JS world, which are more abundant on the Internet, obscuring CLJS as a hidden gem. (This is the case of hiccup, so I am hoping for this).
But I am just starting with this*, any information that you can provide on the best possibilities for the objectives would be helpful. Thank you very much.
Explanations which I needed and probably nobody else:
Single page: Last time I checked, support for Markdown was the latest and easiest thing. Since then, React has changed everything. Instead of linking several pages with <a href="_"/> now it is possible to use <Link to="_"/> from React. The advantages: no additional requests are done to the server, and the transition is immediate, possibly keeping some elements of the page (header and footer).
Gatsby: Seems to be a framework, with plugins, focused on single page static sites. The capabilities seem to be quite handy, like using a headless CMS, database, filesystem (.md, .yaml,…), and other sources of content by querying them with GraphQL to get the JSON content for the site easily.
*, TBH, I am still under a rock, please help.
** For the lulz I have also checked some other technologies, like conversion from Jupyter notebooks to blog posts, macchiato, Netlify, surge.sh, Jamstack, sass, postcss, tailwind, MDX, materialize, GitHub and Gitlab pages,…
† If I need a completely different tech-stack for each thing I want to build, I may as well stay under the rock.