0

I'm getting this warning in the browser console:

On lines: 2 and 3

1. <Grid item xs={12} style={{  borderBottom: "1px solid #e4e4e4" }}>
2.   <div>
3.     <p className={classes.title}>Key Info</p>
4.   </div>
5. </Grid>

It's a React project. Also, I'm using webpack. How to solve this problem?

Audwin Oyong
  • 2,247
  • 3
  • 15
  • 32
Apprentice
  • 33
  • 1
  • 4
  • Hi Jaya, check these answers so you'll see the reason why this happens, [This](https://stackoverflow.com/questions/62112104/validatedomnesting-button-warning), [this](https://stackoverflow.com/questions/61341666/validatedomnesting-button-cannot-appear-as-a-descendant-of-button) and [this](https://stackoverflow.com/questions/39915629/validatedomnesting-tr-cannot-appear-as-a-child-of-div) can be a start – Aurelio Nov 27 '20 at 05:57
  • Its happening because either `Grid` is also `paragaph(

    )`. That's why its giving warning `p` can't be child of `p`

    – Shubham Verma Nov 27 '20 at 05:59
  • What is `Grid`? – Ajeet Shah Nov 27 '20 at 06:44

0 Answers0