DEV Community

React SSR with PHP and WordPress

Wenchen (Neo) Li on March 14, 2019

I am looking for a solution that use React for the font-end and WordPress for the backend with the following requirements: No static rendering at...
Collapse
 
rleija_ profile image
Ruben • Edited

Hmm, you’re kind of crippling yourself here because React and Nodejs play great with each other.

There are other methods to do SSR with php but I would call them kind of hacky

github.com/reactjs/react-php-v8js/...

Collapse
 
li profile image
Wenchen (Neo) Li

Thank you so much for this info!

Collapse
 
pandasedihh profile image
Rio

Use next.js instead?

Collapse
 
li profile image
Wenchen (Neo) Li

but thank you for your help!

Collapse
 
li profile image
Wenchen (Neo) Li

well that's a node.js middleware if we want WordPress to be the backend...

Collapse
 
malithmcr profile image
Malith Priyashan

May be I'm too late to reply. Next.js is a good solution. Use Wordpress Rest api with next.js.

I'm doing it here: craftcode.design/

Collapse
 
juanvegadev profile image
Juan Vega

If you don't want a SPA and also you don't want client side render, why would you choose react?
Have you thought about using other front-end technology?

Collapse
 
li profile image
Wenchen (Neo) Li

well React is what the team is good at and used to, and I don't think we would move away from it...
and also I wouldn't say React is just for client-side SPA even though that's what a big portion of the people are using it for.
moreover, I think we are still aiming for a SPA, what I meant is just not the classic SPAs where you get a blank page as a response no matter the routes,.
but really appreciate you helping! thanks a lot!