S
S
Sergey2017-01-29 00:38:40
React
Sergey, 2017-01-29 00:38:40

How to do server-side rendering of React.js in php?

Wrote a simple corporate website with minimal dynamics on React + React Router as a tutorial and introduction to React.js.
Faced a server-side rendering issue, as all content is generated by components, even if they are completely static.
As far as I understand, you need v8js to compile js to php and issue it to the client before showing the page.
But it seems that all popular hostings do not provide this possibility, and if you buy a server, then there is no point in php, you can put node.js + express
Tell me how to solve the problem if have you come across similar
PS Now on beget.. support is not answering if they have v8js.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
Nikita Gushchin, 2017-01-29
@iNikNik

Make rest API on PHP and separately install nodejs for frontend rendering... and you will be happy!)

V
Vitaly, 2017-09-11
@vitali1995

There is a solution
for you All you have to do is use php7

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question