react-twitter-embed icon indicating copy to clipboard operation
react-twitter-embed copied to clipboard

div inside p

Open joaomilho opened this issue 3 years ago • 0 comments

Hi,

The TwitterTweetEmbed component is generally used inside blocks of text, that is, inside p elements. Therefore it would be best if it wouldn't rely on div elements internally or at least allow the consumer to pass a different element. Currently, react complains with:

Warning: validateDOMNesting(...): <div> cannot appear as a descendant of <p>.
    in div (created by TwitterTweetEmbed)
    ....

Anyways, thanks for the lib!

joaomilho avatar Feb 14 '21 12:02 joaomilho