News for hackers. Stuff that matters.
Re:Storybook for React Server Components by eddd-ddde on Wednesday December 13, 2023 @03:21PM (#38633636)
Not too familiar with React server components, so I have a question.

Are you implying that a client rendered component can be different from a server rendered one? I always assumed this was just implementation details for the same result.

Re:Storybook for React Server Components by halfmatthalfcat on Wednesday December 13, 2023 @04:36PM (#38634478)
They can be different in that server rendered ones are materialized solely on the server, without any context to the browser environment and unable to have any interactivity. It's just HTML when it's SSR'd. However, when "hydrated" or when that component is rendered on the client (browser), it can ship with more interactivity and/or manipulation by its JS.