DEV Community

Cover image for React Server Components (Lingering Questions)
Kris Guzman
Kris Guzman

Posted on

React Server Components (Lingering Questions)

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:

  1. "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?

  2. 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?

  3. Anyone have any good reads on streaming rendering in relation to React?

Top comments (3)

Collapse
 
artemmalko profile image
Artem Malko • Edited

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)

Collapse
 
krisguzman_dev profile image
Kris Guzman

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

Collapse
 
artemmalko profile image
Artem Malko

Great! By the way, where did you find the answers?)