On the Symfony Finland blog there’s a new tutorial posted sharing the results of their effort to get React.js to play nice with Twig, a popular PHP templating library, via a server-side generated template.
If you create Twig templates that match the React rendering, you can take advantage of this feature without a complicated rendering setup.
While there were other methods created to try to solve the problem (rendering the React.js template on the server side) they show a better way via React.js 16 and Twig templates. Code is included showing how to create a simple React application, and how to hook in Twig via a "hydrate" call to pull in the content. React.js has a bit of an issue by default but a little extra work on the Twig side fixes that (see the post for the solution on that one).
from PHPDeveloper.org http://ift.tt/2iaRApq