So I believe the way most meta frameworks handle streaming responses is that they server render the initial response (possibly including loaders/placeholders/fallbacks) with unique identifiers as you suspected, and can start streaming it immediately, then they would include script tags that modify the existing HTML content on the page to get it to the final result. It is similar to hydration, except if done correctly, you could also have some progressive enhancement and functioning HTML, like form fields, etc. And with hydration, you have the double data issue where you need to send some data in JSON or whatever and that you used to render the component first on the server and then again on the client. If you just stream static HTML then there's no need for additional data or processing on the client. BTW I learned all of this from watching Ryan Carniato's streams! He's big on streaming, likely from his time on the Marko core team.
@zombiefacesupreme Жыл бұрын
Holy shit! The end of this video is so exciting!!! I need to play with this NOW.