3 ms·
Yes, it strikes me as quite fragile. Also some weird magic behaviour where any component with "Provider" in the name gets special treatment?
by dbbk 5y ago
Yes, it strikes me as quite fragile. Also some weird magic behaviour where any component with "Provider" in the name gets special treatment?
- danabramov 5y agoTo 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!
- jplhomer 5y ago+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).