Skip to content

Commit

Permalink
Error for deferred value and transition in Server Components
Browse files Browse the repository at this point in the history
  • Loading branch information
sebmarkbage committed Jan 25, 2021
1 parent fb3f63f commit 28e7657
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 28e7657

Please sign in to comment.