|
|
|
|
|
by cynicalreason
2656 days ago
|
|
you don't NEED to include the serialized state in the body of the HTML, this is the common practice, you can wait for the client to parse your js and then make a separate request for the state data. I don't get point 2, if they are to 'hydrate' the react renders in node with data, they have to have a 'fetching' logic in there, the fact that it connects to an 'API' instance makes no difference, the client could use the same connection with same logic client side. |
|
The way I am understanding their blog post, they have a dedicated server (let's call it server1) for api requests, and then a server for rendering (let's call it server2). Server1 does all the fetching logic and then sends the received and appropriately processed json to server2, which needs only to use this data for rendering.