GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Fizz] Add unsupported Portal/Scope components (#21261) · react/react@a4a940d

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/react-server/src
    • ReactFizzServer.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/react-server/src/ReactFizzServer.js‎

Copy file name to clipboardExpand all lines: packages/react-server/src/ReactFizzServer.js
+16-1Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,14 @@ import {
9494
REACT_MEMO_TYPE,
9595
REACT_PROVIDER_TYPE,
9696
REACT_CONTEXT_TYPE,
97+
REACT_SCOPE_TYPE,
9798
} from 'shared/ReactSymbols';
9899
import ReactSharedInternals from 'shared/ReactSharedInternals';
99100
import {
100101
disableLegacyContext,
101102
disableModulePatternComponents,
102103
warnAboutDefaultPropsOnFunctionComponents,
104+
enableScopeAPI,
103105
} from 'shared/ReactFeatureFlags';
104106

105107
import getComponentNameFromType from 'shared/getComponentNameFromType';
@@ -890,6 +892,14 @@ function renderElement(
890892
renderNodeDestructive(request, task, props.children);
891893
return;
892894
}
895+
case REACT_SCOPE_TYPE: {
896+
if (enableScopeAPI) {
897+
renderNodeDestructive(request, task, props.children);
898+
return;
899+
}
900+
invariant(false, 'ReactDOMServer does not yet support scope components.');
901+
}
902+
// eslint-disable-next-line-no-fallthrough
893903
case REACT_SUSPENSE_TYPE: {
894904
renderSuspenseBoundary(request, task, props);
895905
return;
@@ -988,7 +998,12 @@ function renderNodeDestructive(
988998
return;
989999
}
9901000
case REACT_PORTAL_TYPE:
991-
throw new Error('Not yet implemented node type.');
1001+
invariant(
1002+
false,
1003+
'Portals are not currently supported by the server renderer. ' +
1004+
'Render them conditionally so that they only appear on the client render.',
1005+
);
1006+
// eslint-disable-next-line-no-fallthrough
9921007
case REACT_LAZY_TYPE:
9931008
throw new Error('Not yet implemented node type.');
9941009
}

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.