Traditional client-side rendered SPAs: send HTML to start loading JS, JS fetches data, all data comes back to render to the page
DoneJS’s current server-side rendering improves this by including HTML & data in the initial response, but still has to wait for all the data to come back before responding
New incremental server-side rendering:
Initial response will include the bare-minimum to start streaming the server-side rendered HTML body
As the server’s virtual DOM is constructed, the same instructions will be streamed to the client, allowing it to build the page before the app’s JS has been loaded
This results in your page being progressively server-side rendered
Maybe in the future: if the app’s JS finishes before all of the HTML is rendered, have JS take over
This approach allows any server-side rendered app to be progressively loaded, because we’re just sending the necessary DOM mutations over the wire
If your app renders one component, then a second one that manipulates the first one, that’s fine because the DOM events will be played in the same order on the client