navigator.share (Web Share api) share React App text instead of my custom text

Viewed 33

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

0 Answers
Related