Having built over 30 WordPress sites in the past five years, and becoming pretty invested in React, I wanted to see how they could work together to get the job done. So I built the same blog using two completely different tech stacks... for science! 💻
Separation of interests
I used React & Next.js to display the front-end of the blog from WordPress’ RESTful API endpoints, as a 'Headless CMS' - decoupling WordPress from the visual side of the site; allowing for a modern-environment with React, and a separation of interests between the front and back. This separation allows for easier future development and various security benefits.
The web is becoming more and more API-driven, and that just makes sense! Allowing developers to easily create anything from websites to mobile apps using the same data source; the only limit is the CMS itself. You can read a bit more about it and the technical aspects all on the site itself - it doesn't matter which one, it's all the same data from the same place! Decoupled data IS the future!
FYI: little heads-up, I had originally hosted both the React and WordPress/PHP version, but it was getting expensive for something barely used, so is currently offline. The source code can be viewed here however.