I am using react-share and I wonder how /if its possible to share a link insight the email, facebook, twitter etc? I was thinking of just including an a tag but that doesnt work and I> couldnt find anything online. Any ideas? Thanks!!
JavaScript
x
20
20
1
<EmailShareButton
2
url="www.example.com"
3
subject="subject"
4
body={"hey there, pls share my link" + <a href="www.example.com">Link</a>}
5
className="Demo__some-network__share-button">
6
<EmailIcon
7
size={40}
8
round/>
9
</EmailShareButton>
10
11
<FacebookShareButton
12
url="www.example.com"
13
quote="link"
14
className="Demo__some-network__share-button">
15
<FacebookIcon
16
size={40}
17
round
18
/>
19
</FacebookShareButton>
20
…
Advertisement
Answer
Unfortunately this component is using mailto: which prevent inline html to the body. I checked EmailShareButton element on their repository, https://github.com/nygardk/react-share/blob/master/src/EmailShareButton.js#L6
It seems that url
also is skipped and does no action.