question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Error] EmailShareButton is not working

See original GitHub issue
            <EmailShareButton style={{ margin: '0.5rem' }} url={publicUrl} subject='t' body="<div>test</div>">
                <EmailIcon size={60} round />
            </EmailShareButton>,

Here is my code when I click button, nothing happen

my package is

"react": "^16.12.0",
"react-share": "^4.0.1",

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:2
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
tareqdayyacommented, Aug 28, 2020

@blasphemic I’ve used this workaround until it gets fixed:

const handleEmailOnClick = () => {
    window.location.href = encodeURI(`mailto:
    ?subject=${Some.Variable} Subject Here
    &body=Hi,\n\nYou Can bla Bla bla "${some.variable}" At ${url}\n\nEnjoy,`);
  };
return (
  <EmailShareButton url={MY_URL} onClick={handleEmailOnClick}>
        <EmailIcon />
   </EmailShareButton>
);

0reactions
Tejas21-designcommented, Jan 21, 2021

Hello, one more guy bumping into the issue here @tareqdayya thanks, I tried the approach you suggested and it worked on most of the browsers I needed, unfortunately, except Safari on iOS. Ended up rendering just an anchor tag with mailto:... and styling it to match the rest of my share buttons.

how to use that anchor tag into our <emailsharebuttton> could u pls share the code

Read more comments on GitHub >

github_iconTop Results From Across the Web

EmailShareButton cannot open email in new window #153
I'm experiencing the same issue as this, has there been a fix deployed at all?
Read more >
Email Share not working - WordPress.org
Hello I have enabled the email share button by this documentation ... button on that page and it worked fine for me, the...
Read more >
react-share - npm
Start using react-share in your project by running `npm i react-share`. ... no external script loading, i.e. no dependencies on SDKs ...
Read more >
react-share - Bountysource
This is most likely a linkedin problem: click on linkedin share button; select "Share in a post"; Click on your name to change...
Read more >
react-share image not showing when shared - Stack Overflow
You've passed imageURL to your components, but you are reading pictureUrl to show them.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found