Server side rendering of React with Symfony
summary
Shows how to render React from a PHP Symfony app by running Node from PHP, wrapping JS into a runner that writes a temporary file, passing a per-request variant (initial state) and caching the shared bundle. Uses Webpack/Babel (Symfony Webpack Encore), a small PHP library (PHPExec) and ideas borrowed from react_on_rails. Demonstrates working server-side HTML via ReactDOMServer, explains error handling, explains that a V8 extension speeds production a lot but is harder to install.
AI-written summary · about
chapters (13)
- 0:00Introduction to workshop
- 1:29Why server-side rendering
- 11:15Setting up the environment
- 14:09Running JavaScript in PHP
- 22:16Handling JavaScript execution
- 27:27Using PHP-Execute-JS library
- 33:11Introduction to Webpack
- 44:17Configuring Webpack for React
- 54:59React fundamentals
- 1:00:21React components and state
- 1:08:56Server-side rendering with React
- 1:13:57React on Rails integration
- 1:18:02Workshop conclusion
related talks
42mServer-side Rendering of JavaScript in PHP
44mIntegrating React.js with PHP Projects
40mIntegrating React.js into a PHP application
22mSymfony + React = ?
59mBring Your PHP Application to the Next Level with React.JS
46mRethinking Server-Side Rendering in Modern PHP Applications
44mServer Side Rendering from the trenches
40mServer Components for the Rest of Us
