Ideally there should be a way to render JavaScript on the server side for views/templates, like React, without having to write your whole backend in JS. In fact I just googled and found something like this in the reactjs commmunity repo: https://github.com/reactjs/react-php-v8js
One easy solution is to have a server side application that just serves the view layer. That bit can be JavaScript, then your API can be whatever language you want.
Interesting. I definitely want to experiment with something like that. Most examples I've seen of a WP theme in React (e.g. https://github.com/Automattic/Picard) use the new WP API and a node.js app. So there are (at least) two potential approaches to this.
Yeah, I considered that, and in some cases might take that approach.
But in my particular case the websites need to be server-side for SEO, so it's mostly just that I want to use React for reusability and because I prefer it over wordpress theming with php tags.
Furthermore, I can now use React and still deploy the site on a typical LAMP-stack cheap hosting!