News for hackers. Stuff that matters.
Re:API server and a static front end – the future? by sanderjd on Saturday October 03, 2015 @05:30PM (#10325467)
It is definitely the solution, but I've yet to find the setup that makes it cheap and easy to do. Links welcome!
Re:API server and a static front end – the future? by Wintamute on Sunday October 04, 2015 @10:35AM (#10327623)
React + 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.ht...

Re:API server and a static front end – the future? by firasd on Saturday October 03, 2015 @05:41PM (#10325504)
React 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/
Re:API server and a static front end – the future? by GordyMD on Saturday October 03, 2015 @05:58PM (#10325545)
To 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/universalA...