Created
October 8, 2015 12:18
-
-
Save internetsadboy/f0231f045af96800b391 to your computer and use it in GitHub Desktop.
LinkingIOSExample: url resolves to a truncated fragment
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var React = require('react-native'); | |
var { | |
AppRegistry, | |
StyleSheet, | |
LinkingIOS, | |
Text, | |
View, | |
} = React; | |
var LinkingIOSExample = React.createClass({ | |
render: function() { | |
return ( | |
<View style={styles.container}> | |
<Text>LinkingIOS Example</Text> | |
<Text | |
onPress={() => LinkingIOS.openURL( | |
'https://en.wikipedia.org/wiki/Binary_number#Counting_in_binary' | |
)} | |
style={styles.hyperlink}> | |
{'Counting in binary'} | |
</Text> | |
</View> | |
); | |
} | |
}); | |
var styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
justifyContent: 'center', | |
alignItems: 'center', | |
backgroundColor: '#F5FCFF', | |
}, | |
hyperlink: { | |
borderWidth: 0, | |
color: 'blue', | |
textDecorationLine: 'underline' | |
} | |
}); | |
AppRegistry.registerComponent('LinkingIOSExample', () => LinkingIOSExample); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment