validateDOMNesting(...): <div> cannot appear as a descendant of <p>. 1

validateDOMNesting(…):
cannot appear as a descendant of

.

...

//According to this document, a

tag can only contain inline elements. That means putting a
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")

Here is what the above code is Doing:
1. document.querySelectorAll(” p * div “)
– This is a query selector that will find all div tags that are inside a p tag.
– The * is a wildcard that will find all tags that are inside the p tag.
– The space before and after the p tag is to make sure that the div tag is inside the p tag, and not just a descendant of the p tag.
– The space before and after the div tag is to make sure that the div tag is inside the p tag, and not just a descendant of the p tag.
2. document.querySelectorAll(“p > div”)
– This is a query selector that will find all div tags that are inside a p tag.
– The > is a wildcard that will find all tags that are inside the p tag.
– The space before and after the p tag is to make sure that the div tag is inside the p tag, and not just a descendant of the p tag.
– The space before and after the div tag is to make sure that the div tag is inside the p tag, and not just a descendant of the p tag.

Similar Posts