Div cannot appear as descent of p in React | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Div cannot appear as descent of p in React

How to solve this problem? Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>. in div (created by RadioButtonIcon)

11th May 2021, 7:22 AM
Yamin Mansuri
Yamin Mansuri - avatar
1 Answer
+ 7
function App(){ return( <div> <p>text</p> </div> ) } Use ReactDOM.render("App") Watch It For Better Info https://youtu.be/HTOmxV2J6fI
11th May 2021, 7:35 AM
Papa Penguin