We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents cd2e45b + 1aac8c4 commit 970f053Copy full SHA for 970f053
lib/useClipboard.js
@@ -4,9 +4,12 @@ import { Clipboard } from 'react-native'
4
export default () => {
5
const [data, updateClipboardData] = useState('')
6
7
- useEffect(async () => {
8
- const content = await Clipboard.getString()
9
- updateClipboardData(content)
+ useEffect(() => {
+ async function updateClipboard() {
+ const content = await Clipboard.getString()
10
+ updateClipboardData(content);
11
+ }
12
+ updateClipboard()
13
}, [])
14
15
function setString(content) {
0 commit comments