Does this do what I think it does… let you take a website in a CMS (WordPress is one mentioned) and generate a static HTML React based app? Or am I misunderstanding this?
The opposite actually – it lets you take an existing React app and it generates HTML + JS that can be served statically (i.e. without requiring a database or server state).
Here’s another similar tool with a better explanation: https://www.gatsbyjs.org/features/
Thanks. That part I understood (though I’m guessing as to what precisely is meant by React App), but it’s the significance of WordPress etc in their architecture that I’m curious about. It seems to suggest you can start with WordPress, and end up with a React App style static site. No?
To quote from the blog post what I assume you’re referring to:
It became very clear to us at this point that we need something that behaves more like a React app and less like a Wordpress templating system.
React-Static doesn’t use WordPress in their architecture, they’re just comparing their product to WordPress to explain it.
React-Static seems to be touting itself as an alternative to using WordPress, rather than a companion.
Thanks. As I thought re app!
I’m maybe being mislead by their diagram - the way it is done looks like WordPress etc are being used as inputs, but maybe they are portraying R-S as an alternative as you suggest. This was the reason for my question in the OP - is not clear really what they mean by it.
Oh I see the diagram you’re referring to now. WordPress is shown as a possible data source, i.e. you can use your WordPress database with a React app (but this is not unique to React-Static, anyone can do this). You still have to write the whole React app from scratch, but you can, for example, save your Users database on WordPress to pull data from. Does that clarify it?
Yes, sounds half there to me - as in if you have you have a plain (ie not React based) WordPress website, but would need to create a React App that can replace your WordPress theme, and then you could create a static version of this.
So this could be relatively easy, if there are existing React App WordPress templates, which seems quite likely.
Thanks. Sounds worth looking into as a route to get WordPress websites into SAFE.
Now, to find the time!
It’s a nodejs based static site generator for any wordpress theme.
I’ve been meaning to string this together with a wordpress/docker setup so we could have something easily downloadable for generating files for safe. And then it’s not a far cry to automate the PUT after that to the network. Just… time. Heh, never enough of it.
But take a look. It might help if you don’t specifically want to use react themes with your wordpress. Any Qs give me a ping!