I am still new programmer but I have an idea about project. I think about architecture for now. So my question is "Which is the best way to use react on server side render in PHP backend". I have researched and I`ve found two decision about that.
====================================================
First is to use React.js SSR with a Node.js service.
Advantages:
Easy to install and update
Standart enviorment for running react.js
Disadvantages:
- Maintain separate server
====================================================
Second is to use React.js SSR with PHP`s V8Js.
Advantages:
- Write js in PHP.
Disadvantages:
Complicate install and update process
Maybe V8Js is not scalable
I also find "react-php-v8js" library but maybe it`s still experimental. I want to know:
Is there any other ways to render React.js in PHP?
Which way gives better performance?
Which way is better in production?
What do you think about SSR React.js with PHP?
My backend will be in PHP. And I will use custom framework if it does matter. :)