File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
packages/react-dom/src/server Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1211,7 +1211,11 @@ export function pushStartInstance(
12111211 formatContext . insertionMode !== SVG_MODE &&
12121212 formatContext . insertionMode !== MATHML_MODE
12131213 ) {
1214- if ( type . toLowerCase ( ) !== type ) {
1214+ if (
1215+ type . indexOf ( '-' ) === - 1 &&
1216+ typeof props . is !== 'string' &&
1217+ type . toLowerCase ( ) !== type
1218+ ) {
12151219 console . error (
12161220 '<%s /> is using incorrect casing. ' +
12171221 'Use PascalCase for React components, ' +
Original file line number Diff line number Diff line change @@ -1331,11 +1331,14 @@ class ReactDOMServerRenderer {
13311331 namespace = getIntrinsicNamespace ( tag ) ;
13321332 }
13331333
1334+ let props = element . props ;
1335+
13341336 if ( __DEV__ ) {
13351337 if ( namespace === HTML_NAMESPACE ) {
1338+ const isCustomComponent = isCustomComponentFn ( tag , props ) ;
13361339 // Should this check be gated by parent namespace? Not sure we want to
13371340 // allow <SVG> or <mATH>.
1338- if ( tag . toLowerCase ( ) !== element . type ) {
1341+ if ( ! isCustomComponent && tag . toLowerCase ( ) !== element . type ) {
13391342 console . error (
13401343 '<%s /> is using incorrect casing. ' +
13411344 'Use PascalCase for React components, ' +
@@ -1348,7 +1351,6 @@ class ReactDOMServerRenderer {
13481351
13491352 validateDangerousTag ( tag ) ;
13501353
1351- let props = element . props ;
13521354 if ( tag === 'input' ) {
13531355 if ( __DEV__ ) {
13541356 checkControlledValueProps ( 'input' , props ) ;
You can’t perform that action at this time.
0 commit comments