2 ms·
It is definitely the solution, but I've yet to find the setup that makes it cheap and easy to do. Links welcome!
by sanderjd 11y ago
It is definitely the solution, but I've yet to find the setup that makes it cheap and easy to do. Links welcome!
- firasd 11y agoReact will render HTML on the server side using the same code and data structures you use for dynamic components on the client side. https://facebook.github.io/react/ https://facebook.github.io/react/
- GordyMD 11y agoTo demonstrate this point for those not familiar. Here is an example of using React + Redux on the server to render with an initial state. https://github.com/GordyD/3ree/blob/master/server/universalApp.js https://github.com/GordyD/3ree/blob/master/server/universalA...
- Wintamute 11y agoReact + some sort sort of library to handle app state (Redux is recommended). You gain a modern componentised frontend app and the ability to render it server side. Server rendering of a React app is pretty simple, of order maybe a 100 lines of code or so. And that includes populating the server rendered pages from the same API as the frontend uses. Redux docs may be a decent place to start: http://rackt.github.io/redux/docs/recipes/ServerRendering.html http://rackt.github.io/redux/docs/recipes/ServerRendering.ht...