Skip to content

Commit

Permalink
docs(share-single): document that error is thrown when sheet is closed (
Browse files Browse the repository at this point in the history
#1292)

As the title states, this small doc change would have saved me from the issue I raised in #1291

Totally flexible about the wording or arrangement, I think it's just important to mention somewhere in the docs that closing the sheet throws an error.
  • Loading branch information
princefishthrower committed Oct 14, 2022
1 parent 65b65ec commit b4eec95
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions website/docs/share-single.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,16 @@ Or with `async/await`:
}
```

*Note that in the case of a user closing the share sheet without sharing, an error will be thrown. It is up to you to handle this error, i.e.:

```js
try {
const shareResponse = await Share.shareSingle(shareOptions);
} catch (error) {
// handle error
}
```

## Supported Options

You can pass the option that will be handled by the native code, similar to `Share.open`.
Expand Down

0 comments on commit b4eec95

Please sign in to comment.