diff --git a/docs/next/share.html b/docs/next/share.html index 87e287e0265..50701881e96 100644 --- a/docs/next/share.html +++ b/docs/next/share.html @@ -78,7 +78,42 @@

dismissedAction()

static dismissedAction()
 
-

The dialog has been dismissed. @platform ios

+

iOS Only. The dialog has been dismissed.

+

Basic Example

+
import React, {Component} from 'react'
+import {Share, Button} from 'react-native'
+
+class ShareExample extends Component {
+
+  async onShare = () => {
+    try {
+      const result = await Share.share({
+        message:
+          'React Native | A framework for building native apps using React',
+      })
+
+      if (result.action === Share.sharedAction) {
+        if (result.activityType) {
+          // shared with activity type of result.activityType
+        } else {
+          // shared
+        }
+      } else if (result.action === Share.dismissedAction) {
+        // dismissed
+      }
+    } catch (error) {
+      alert(error.message);
+    }
+  };
+
+  render() {
+    return (
+      <Button onPress={this.onShare}>Share</Button>
+    );
+  }
+
+}
+
← Shadow PropsStatusBarIOS →