Description
We're getting a lot of questions about whether RTK Query works with RSCs.
Quoting Lenz at https://twitter.com/phry/status/1666553972075687938 :
There's a lot of nuance. In client components, it effectively already works, but not for SSR. In RSC, it's probably not a particularly useful/good idea. In Client component SSR we need support for two things: streaming SSR data transport and a good suspense story.
Of those last two things, the first right now can only be solved in a very unsatisfying way with a Next-specific api. The latter would probably build on top of
use
, but it would be a "temporary" api design until React would add use support for observables (if they ever do).
We're also looking at tweaking RTKQ + React-Redux to not throw errors related to calling createContext
in an RSC environment.