Skip to content

Commit 232a4dd

Browse files
authored
Merge pull request #42 from Almouro/patch-1
Update README.md
2 parents b146e1c + b2b7cb9 commit 232a4dd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ import InAppBrowser from 'react-native-inappbrowser-reborn';
6060
async openLink() {
6161
try {
6262
await InAppBrowser.isAvailable()
63-
InAppBrowser.open('https://www.google.com', {
63+
const result = await InAppBrowser.open('https://www.google.com', {
6464
// iOS Properties
6565
dismissButtonStyle: 'cancel',
6666
preferredBarTintColor: 'gray',
@@ -84,9 +84,8 @@ import InAppBrowser from 'react-native-inappbrowser-reborn';
8484
headers: {
8585
'my-custom-header': 'my custom header value'
8686
},
87-
}).then((result) => {
88-
Alert.alert(JSON.stringify(result))
89-
})
87+
});
88+
Alert.alert(JSON.stringify(result));
9089
} catch (error) {
9190
Alert.alert(error.message)
9291
}

0 commit comments

Comments
 (0)