I'm trying to use navigator.canShare() and navigator.share() to experiment with websharing in a react app.
When I call navigator.canShare() in react, I get the following run time error:
TypeError: navigator.share is not a function
How can I get react to recognize navigator.canShare()?
As mentioned in MDN docs, you can only use navigator.share() over HTTPS
Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With