Skip to content

Commit

Permalink
Error for deferred value and transition in Server Components (#20657)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Jan 25, 2021
1 parent fb3f63f commit a511dc7
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/react-server/src/ReactFlightServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,12 +773,8 @@ const Dispatcher: DispatcherType = {
return callback;
},
useDebugValue(): void {},
useDeferredValue<T>(value: T): T {
return value;
},
useTransition(): [(callback: () => void) => void, boolean] {
return [() => {}, false];
},
useDeferredValue: (unsupportedHook: any),
useTransition: (unsupportedHook: any),
getCacheForType<T>(resourceType: () => T): T {
invariant(
currentCache,
Expand Down

0 comments on commit a511dc7

Please sign in to comment.