@samitouri / QOS-React-2 / commits / a511dc7090

Error for deferred value and transition in Server Components (#20657)

Sebastian Markbåge committed Jan 25, 2021 at 16:58 UTC a511dc7090523ee49ce21a08e55c41917d8af311
1 file changed +2 -6
packages/react-server/src/ReactFlightServer.js
+2 -6
@@ -773,12 +773,8 @@ const Dispatcher: DispatcherType = {
773 return callback;
774 },
775 useDebugValue(): void {},
776 - useDeferredValue<T>(value: T): T {
777 - return value;
778 - },
779 - useTransition(): [(callback: () => void) => void, boolean] {
780 - return [() => {}, false];
781 - },
776 + useDeferredValue: (unsupportedHook: any),
777 + useTransition: (unsupportedHook: any),
778 getCacheForType<T>(resourceType: () => T): T {
779 invariant(
780 currentCache,