From 28e7657d017aa2147cd8692f6f660b2de29ff345 Mon Sep 17 00:00:00 2001 From: Sebastian Markbage Date: Mon, 25 Jan 2021 16:41:16 -0500 Subject: [PATCH] Error for deferred value and transition in Server Components --- packages/react-server/src/ReactFlightServer.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/react-server/src/ReactFlightServer.js b/packages/react-server/src/ReactFlightServer.js index 2e7d48ad7ca1a..b80798cd66f4b 100644 --- a/packages/react-server/src/ReactFlightServer.js +++ b/packages/react-server/src/ReactFlightServer.js @@ -773,12 +773,8 @@ const Dispatcher: DispatcherType = { return callback; }, useDebugValue(): void {}, - useDeferredValue(value: T): T { - return value; - }, - useTransition(): [(callback: () => void) => void, boolean] { - return [() => {}, false]; - }, + useDeferredValue: (unsupportedHook: any), + useTransition: (unsupportedHook: any), getCacheForType(resourceType: () => T): T { invariant( currentCache,