mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
[Flight] Add getCacheForType() to the dispatcher (#20315)
* Remove react/unstable_cache We're probably going to make it available via the dispatcher. Let's remove this for now. * Add readContext() to the dispatcher On the server, it will be per-request. On the client, there will be some way to shadow it. For now, I provide it on the server, and throw on the client. * Use readContext() from react-fetch This makes it work on the server (but not on the client until we implement it there.) Updated the test to use Server Components. Now it passes. * Fixture: Add fetch from a Server Component * readCache -> getCacheForType<T> * Add React.unstable_getCacheForType * Add a feature flag * Fix Flow * Add react-suspense-test-utils and port tests * Remove extra Map lookup * Unroll async/await because build system * Add some error coverage and retry * Add unstable_getCacheForType to Flight entry
This commit is contained in:
@@ -367,5 +367,7 @@
|
||||
"376": "Only global symbols received from Symbol.for(...) can be passed to client components. The symbol Symbol.for(%s) cannot be found among global symbols. Remove %s from this object, or avoid the entire object: %s",
|
||||
"377": "BigInt (%s) is not yet supported in client component props. Remove %s from this object or use a plain number instead: %s",
|
||||
"378": "Type %s is not supported in client component props. Remove %s from this object, or avoid the entire object: %s",
|
||||
"379": "Refs cannot be used in server components, nor passed to client components."
|
||||
"379": "Refs cannot be used in server components, nor passed to client components.",
|
||||
"380": "Reading the cache is only supported while rendering.",
|
||||
"381": "This feature is not supported by ReactSuspenseTestUtils."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user