React-native-share: _reactNative.NativeModules.RNShare.shareSingle error

Created on 28 Sep 2016  路  3Comments  路  Source: react-native-share/react-native-share

Hi

i installed the library using npm and did react-native link.

when i try to do the share i get the following error:

Possible Unhandled Promise Rejection (id: 0):
Cannot read property 'shareSingle' of undefined
TypeError: Cannot read property 'shareSingle' of undefined

It seems like it cant find the native modules even though i did react-native link

any help?

Thanks
Chris

bug

Most helpful comment

In the source we see both methods 'open' and 'shareSingle' are Promises so we have to handle them:

Share.open(shareOptions)
.catch(err => console.log(err))

You should mention this in the readme in addition to fixing the issue.
Thx for this useful component btw.

All 3 comments

In the source we see both methods 'open' and 'shareSingle' are Promises so we have to handle them:

Share.open(shareOptions)
.catch(err => console.log(err))

You should mention this in the readme in addition to fixing the issue.
Thx for this useful component btw.

try with the new version of lib

Was this page helpful?
0 / 5 - 0 ratings