React Native hook for Clipboard
import useClipboard from '@rnhooks/clipboard';
function App() {
const [content, updateContent] = useClipboard();
return (
<View style={styles.container}>
<Text style={styles.type}>{`Content: ${content}`}</Text>
<Button title="Update" onPress={() => updateContent('test string')} />
</View>
);
}
Name | Type | Default | Description |
---|---|---|---|
content | String | null |
Clipboard content string |
updateContent | function | () => {} |
Clipboard content string update function |
- @pritishvaidya The main author.
Feel free to contact me or create an issue