I am getting familiar with what React based static site generation options are available, which can make use of ReScript. I am a novice on the frontend, with basic Elm experience. I have come across the following options:
- larger framework (next-js, gatsby)
- smaller framework (react-static)
- scraping pages from plain react app (react-snap)
- WIP projects in pure reason or ocaml that could be extended (refabricate, finch, stationary, soupalt, stog)
- imitate react-static or next-js, with fewer features, custom tailored to my needs using ReScript and appropriate build settings
Does anybody have experience with react-static or react-snap?
I have found examples of gatsby and nextjs with reason.
1 Like
If you keep your ReScript JS output tabs open and make sure that they match what e.g. react-static wants, then you should be good to go.
Thinking further, my ideal would be using hugo (or an ocaml tool that emerges later) + webpack + reasonreact for static gen site with a small amount of client fetched data.
I will keep going with next.js + reasonreact for now, since I don’t want to figure out the tooling integration between react and hugo builds right now.
My favorite option would be porting 11ty to pure ReScript, if that ever happens. I like hugo the most so far, but 11ty will probably outlast hugo as it will be easier for a JS based library to pick up new templating and css libraries as those evolve.
2 Likes