saurabhnemade / react-twitter-embed

Simplest way to add twitter widgets to your react project.
https://saurabhnemade.github.io/react-twitter-embed/
367 stars 66 forks source link

div inside p #76

Open joaomilho opened 3 years ago

joaomilho commented 3 years ago

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!