0.0.1 • Published 5 years ago
@rnhooks/linking v0.0.1
@rnhooks/linking
React Native hook for Linking
Installation
yarn add @rnhooks/linking
Usage
import useLinking from '@rnhooks/linking';
function App() {
const [url, openUrl, error] = useLinking();
return (
<View style={styles.container}>
<Text style={styles.welcome}>@rnhooks/linking</Text>
<Text style={styles.instructions}>Linking URL</Text>
<Text style={styles.instructions}>{url || error}</Text>
<Button title="Update" onPress={() => openUrl(URL)} />
</View>
);
}
Output
Name | Default | Type | Description |
---|---|---|---|
url | null | string | Linking URL |
openUrl | () => {} | function | Open Linking URL |
error | null | string | Error |
0.0.1
5 years ago