I watched the talk on React Server Components, and after all the excitement finally settled, I was actually left a bit confused. Hoping some smarter folks than I can shed some light on a few things:
"Server components don't render into HTML, they render into a special format" - Then what parses that special format into rendered HTML once it's streamed to the client? Does the React client side library do this automagically?
I understand that server components can be re-fetched when props change, while still maintaining the rendered dom on the client, but how are server components made aware of changes in props triggered in client components?
Anyone have any good reads on streaming rendering in relation to React?
Top comments (3)
Hi!
I can't answer the first two questions properly, but I have something to say about the last one)
I have an experimental project, which is used React 18 and that new suspense SSR Architecture. Check out readme.md in the repository, to get info about used technologies. So, the main idea is to add a dehydrated data into the writeable stream, while React is rendering your app. You can get the main concept from the discussion in react-query repo. Fell free to ask me anything about it.
By the way, I do now know, is it a 100% correct idea, but it works, and it works just fine)
awesome! thank you i'll check it out when I get the chance. I found the answers to my other questions, which I'll leave as a comment on this discussion momentarily
Great! By the way, where did you find the answers?)