Skip to content

Commit c7c8277

Browse files
committed
Warning for non-lower case HTML
We don't change to lower case at runtime anymore but keep the warning.
1 parent aeffeed commit c7c8277

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

packages/react-dom/src/server/ReactDOMServerFormatConfig.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,20 @@ export function pushStartInstance(
11681168
'probably not intentional.',
11691169
);
11701170
}
1171+
1172+
if (
1173+
formatContext.insertionMode !== SVG_MODE &&
1174+
formatContext.insertionMode !== MATHML_MODE
1175+
) {
1176+
if (type.toLowerCase() !== type) {
1177+
console.error(
1178+
'<%s /> is using incorrect casing. ' +
1179+
'Use PascalCase for React components, ' +
1180+
'or lowercase for HTML elements.',
1181+
type,
1182+
);
1183+
}
1184+
}
11711185
}
11721186

11731187
switch (type) {

0 commit comments

Comments
 (0)