cannot appear as a descendant of

前端 未结 11 504
执念已碎
执念已碎 2021-01-30 04:36

I\'m seeing this. It\'s not a mystery what it is complaining about:

Warning: validateDOMnesting(...): 
cannot appear as a descendant of

. See

11条回答
  •  生来不讨喜
    2021-01-30 05:27

    Based on the warning message, the component ReactTooltip renders an HTML that might look like this:

    ...

    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.

提交回复
热议问题