@@ -185,7 +185,6 @@ if (__DEV__) {
185185 }
186186 didWarnInvalidHydration = true ;
187187 warningWithoutStack (
188- false ,
189188 'Text content did not match. Server: "%s" Client: "%s"' ,
190189 normalizedServerText ,
191190 normalizedClientText ,
@@ -211,7 +210,6 @@ if (__DEV__) {
211210 }
212211 didWarnInvalidHydration = true ;
213212 warningWithoutStack (
214- false ,
215213 'Prop `%s` did not match. Server: %s Client: %s' ,
216214 propName ,
217215 JSON . stringify ( normalizedServerValue ) ,
@@ -228,13 +226,12 @@ if (__DEV__) {
228226 attributeNames . forEach ( function ( name ) {
229227 names . push ( name ) ;
230228 } ) ;
231- warningWithoutStack ( false , 'Extra attributes from the server: %s' , names ) ;
229+ warningWithoutStack ( 'Extra attributes from the server: %s' , names ) ;
232230 } ;
233231
234232 warnForInvalidEventListener = function ( registrationName , listener ) {
235233 if ( listener === false ) {
236234 warning (
237- false ,
238235 'Expected `%s` listener to be a function, instead got `false`.\n\n' +
239236 'If you used to conditionally omit it with %s={condition && value}, ' +
240237 'pass %s={condition ? value : undefined} instead.' ,
@@ -244,7 +241,6 @@ if (__DEV__) {
244241 ) ;
245242 } else {
246243 warning (
247- false ,
248244 'Expected `%s` listener to be a function, instead got a value of `%s` type.' ,
249245 registrationName ,
250246 typeof listener ,
@@ -416,13 +412,14 @@ export function createElement(
416412 isCustomComponentTag = isCustomComponent ( type , props ) ;
417413 // Should this check be gated by parent namespace? Not sure we want to
418414 // allow <SVG> or <mATH>.
419- warning (
420- isCustomComponentTag || type === type . toLowerCase ( ) ,
421- '<%s /> is using incorrect casing. ' +
422- 'Use PascalCase for React components, ' +
423- 'or lowercase for HTML elements.' ,
424- type ,
425- ) ;
415+ if ( ! isCustomComponentTag && type !== type . toLowerCase ( ) ) {
416+ warning (
417+ '<%s /> is using incorrect casing. ' +
418+ 'Use PascalCase for React components, ' +
419+ 'or lowercase for HTML elements.' ,
420+ type ,
421+ ) ;
422+ }
426423 }
427424
428425 if ( type === 'script' ) {
@@ -432,7 +429,6 @@ export function createElement(
432429 if ( __DEV__ ) {
433430 if ( enableTrustedTypesIntegration && ! didWarnScriptTags ) {
434431 warning (
435- false ,
436432 'Encountered a script tag while rendering React component. ' +
437433 'Scripts inside React components are never executed when rendering ' +
438434 'on the client. Consider using template tag instead ' +
@@ -488,7 +484,6 @@ export function createElement(
488484 ) {
489485 warnedUnknownTags [ type ] = true ;
490486 warning (
491- false ,
492487 'The tag <%s> is unrecognized in this browser. ' +
493488 'If you meant to render a React component, start its name with ' +
494489 'an uppercase letter.' ,
@@ -525,7 +520,6 @@ export function setInitialProperties(
525520 ( domElement : any ) . shadyRoot
526521 ) {
527522 warning (
528- false ,
529523 '%s is using shady DOM. Using shady DOM with React can ' +
530524 'cause things to break subtly.' ,
531525 getCurrentFiberOwnerNameInDevOrNull ( ) || 'A component' ,
@@ -926,7 +920,6 @@ export function diffHydratedProperties(
926920 ( domElement : any ) . shadyRoot
927921 ) {
928922 warning (
929- false ,
930923 '%s is using shady DOM. Using shady DOM with React can ' +
931924 'cause things to break subtly.' ,
932925 getCurrentFiberOwnerNameInDevOrNull ( ) || 'A component' ,
@@ -1219,7 +1212,6 @@ export function warnForDeletedHydratableElement(
12191212 }
12201213 didWarnInvalidHydration = true ;
12211214 warningWithoutStack (
1222- false ,
12231215 'Did not expect server HTML to contain a <%s> in <%s>.' ,
12241216 child . nodeName . toLowerCase ( ) ,
12251217 parentNode . nodeName . toLowerCase ( ) ,
@@ -1237,7 +1229,6 @@ export function warnForDeletedHydratableText(
12371229 }
12381230 didWarnInvalidHydration = true ;
12391231 warningWithoutStack (
1240- false ,
12411232 'Did not expect server HTML to contain the text node "%s" in <%s>.' ,
12421233 child . nodeValue ,
12431234 parentNode . nodeName . toLowerCase ( ) ,
@@ -1256,7 +1247,6 @@ export function warnForInsertedHydratedElement(
12561247 }
12571248 didWarnInvalidHydration = true ;
12581249 warningWithoutStack (
1259- false ,
12601250 'Expected server HTML to contain a matching <%s> in <%s>.' ,
12611251 tag ,
12621252 parentNode . nodeName . toLowerCase ( ) ,
@@ -1281,7 +1271,6 @@ export function warnForInsertedHydratedText(
12811271 }
12821272 didWarnInvalidHydration = true ;
12831273 warningWithoutStack (
1284- false ,
12851274 'Expected server HTML to contain a matching text node for "%s" in <%s>.' ,
12861275 text ,
12871276 parentNode . nodeName . toLowerCase ( ) ,
0 commit comments