How to use share API in react native

How to use share API in react native

command: yarn add react-native-share

import Share from 'react-native-share';

Share.open(options)

  .then((res) => {

    console.log(res);

  })

  .catch((err) => {

    err && console.log(err);

  });

Here urlString is a image path returned from view-shot plugin.

Title: the title you want in whatsapp message. Usually not required.

Message: the message u want to use on sharing the image.

Resources: