New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More →

@expo/react-native-link

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/react-native-link - npm Package Compare versions

Comparing version

to
4.0.0

@@ -7,36 +7,21 @@ /**

*/
var React = require('react-native');
var {
AppRegistry,
Image,
ScrollView,
StyleSheet,
Text,
TouchableHighlight,
View,
} = React;
import React from 'react';
import { TouchableHighlight, Linking } from 'react-native';
var URLHandler = require('react-native-url-handler');
var Link = React.createClass({
export default class Link extends React.Component {
render() {
return (
<TouchableHighlight onPress={this._linkPressed} {...this.props} />
);
},
return <TouchableHighlight onPress={this._linkPressed} {...this.props} />;
}
_linkPressed() {
_linkPressed = () => {
if (this.props.url) {
URLHandler.openURL(this.props.url);
Linking.openURL(this.props.url);
} else if (this.props.to && this.props.to.uri) {
var url = this.props.to.uri;
URLHandler.openURL(url);
const url = this.props.to.uri;
Linking.openURL(url);
} else {
console.error("Invalid Link destination:", this.props.to);
console.error('Invalid Link destination:', this.props.to);
}
},
});
module.exports = Link;
};
}
{
"name": "@expo/react-native-link",
"version": "3.0.0",
"version": "4.0.0",
"description": "A <Link> element for React Native, analogous to the <A> tag in HTML",

@@ -22,6 +22,3 @@ "main": "link.js",

},
"homepage": "https://github.com/expo/react-native-link#readme",
"peerDependencies": {
"react-native-url-handler": "*"
}
"homepage": "https://github.com/expo/react-native-link#readme"
}