4 ms·
The funny thing is as far as I know they still use PHP to render React (via embedded javascript interpreter) on the server.
by chrischen 4y ago
The funny thing is as far as I know they still use PHP to render React (via embedded javascript interpreter) on the server.
- nindalf 4y agoYou have a source for that? The React code I've seen at Facebook is client rendered.
- chrischen 4y ago> Whenever they want to run JavaScript on server (e.g. rendering React on server) they just use V8 directly rather than using Node. I forgot where I read it, but it was someone on the internet where they embed V8 and call from PHP (Hack). https://hashnode.com/post/10-things-you-probably-didnt-know-about-javascript-react-and-nodejs-and-graphql-development-at-facebook-cink0r0e500h5io53fpl7ediu https://hashnode.com/post/10-things-you-probably-didnt-know-... It's true they don't really use SSR that widely, as Facebook.com doesn't really need it, but I'm pretty sure they do use streaming SSR, which offers UX benefits.
- nindalf 4y agoFrom your link > Yes, Facebook uses SSR heavily. However, according to Lee, there are very few areas where they use React to render components on server. This was primarily a decision based on their server environment which is Hack. Yeah this is my whole point. That person was attempting to school devs at Facebook on the benefits of server side rendering in PHP. And whatever you said was quite niche.