Re:Hydrogen: React-based framework for building custom store...
by dbbk on Monday November 08, 2021 @02:58PM
(#29153492)
Yes, it strikes me as quite fragile. Also some weird magic behaviour where any component with "Provider" in the name gets special treatment?
[ Parent
| on HN ]
Re:Hydrogen: React-based framework for building custom store...
by danabramov on Monday November 08, 2021 @03:25PM
(#29153792)
To be clear, the Provider special treatment part is not something React Server Components do -- that seems specific to Hydrogen. My best guess is that this is some kind of a temporary workaround for the fact that we haven't built a "server context" concept into React yet (but it's a planned feature, as was noted in the original Server Components RFC). If something is confusing, I'm sure the team would appreciate the feedback on this issue!
Re:Hydrogen: React-based framework for building custom store...
by jplhomer on Monday November 08, 2021 @08:07PM
(#29156458)
+1 to what Dan said! `*Provider` handling of client components is a workaround for lack of server context right now. When server context ships, we'll migrate to it in Hydrogen.
There are several other things that are specific to Hydrogen that will likely change during the dev preview period as React introduces new features (like server context and SSR with RSC).