@@ -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' ;
9899import ReactSharedInternals from 'shared/ReactSharedInternals' ;
99100import {
100101 disableLegacyContext ,
101102 disableModulePatternComponents ,
102103 warnAboutDefaultPropsOnFunctionComponents ,
104+ enableScopeAPI ,
103105} from 'shared/ReactFeatureFlags' ;
104106
105107import 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