“P no puede aparecer como descendiente de P React” Código de respuesta

ValidatedOmnesting (...): no puede aparecer como descendiente de

.

<p>
   <div>...</div>
</p>
//According to this document, a <p></p> tag can only contain inline elements. That means putting a <div></div> tag inside it should be improper, since the div tag is a block element. Improper nesting might cause glitches like rendering extra tags, which can affect your javascript and css.

//If you want to get rid of this warning, you might want to customize the ReactTooltip component, or wait for the creator to fix this warning.
//If you're looking for where this is happening, in console you can use:
document.querySelectorAll(" p * div ")
//Here's another version that made finding the item more verbose for me 
document.querySelectorAll("p > div")
code fighter

JavaScript por Code Fighter

<Typography component={'span'} variant={'body2'}>
Mystic Dev

The warning tells you what exactly you need to do. You cannot nest <p> tags and hence use div for the outer tag like

<div>
   {this.state.error && 
      <p className="errorText">
           {this.state.error}
       </p>
   }
</div> 
Himanshu Jangid

Respuestas similares a “P no puede aparecer como descendiente de P React”

Preguntas similares a “P no puede aparecer como descendiente de P React”

Más respuestas relacionadas con “P no puede aparecer como descendiente de P React” en JavaScript

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código

C#
C++
C
CSS
PHP
Sql
Go
R
VBA
Lua