1

Yes, I'm using HTTPS. Yes, I'm in a browser that supports Web Share Api (Safari 13.0.4). It does share correctly, but just not using the text I provided and yes a generic text of: "React App localhost this website was created using create-react-app"

This is the function I use to share:

const handleClick = () => {
    if (navigator.share) {
      navigator
        .share({
          title: "Something",
          text: "Hello, please come visit my website",
          url: "www.website.com.br",
        })
        .then(() => {
          console.log("Successfully shared");
        })
        .catch((error) => {
          console.error("Something went wrong", error);
        });
    }
  };

Why is React overriding my share and how can I avoid that? Here's a gif of it happening

W. Lucas
  • 23
  • 1
  • 6

0 Answers0