Skip to content

Instantly share code, notes, and snippets.

@internetsadboy
Created October 8, 2015 12:18
Show Gist options
  • Save internetsadboy/f0231f045af96800b391 to your computer and use it in GitHub Desktop.
Save internetsadboy/f0231f045af96800b391 to your computer and use it in GitHub Desktop.
LinkingIOSExample: url resolves to a truncated fragment
'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