@rnhooks/clipboard
v0.0.1
Published
React Native hook for Clipboard
Downloads
4
Readme
@rnhooks/clipboard
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>
);
}
Output
| Name | Type | Default | Description |
| :------------ |---------------:| :---------------| :-----|
| content | String | null
| Clipboard content string |
| updateContent | function | () => {}
| Clipboard content string update function |
Contribution
- @pritishvaidya The main author.
Questions
Feel free to contact me or create an issue