【发布时间】:2021-11-23 23:33:16
【问题描述】:
我是 react native 的新手。我的应用程序中有一个文本输入区域。我想将用户写的文本发送到我的 gmail 。我该怎么做?
这是我的代码:
import React, { useState } from "react"
import { View, Text, TextInput } from "react-native"
import ModalButton from "./ModalButton"
import styles from "./theme"
const StoreReview = (props) => {
const [comment, setComment] = useState('')
return (
<View style={styles.container}>
<Text style={styles.headerText}>
We are very sorry about this.
Can you share your experiences?
</Text>
<View style={styles.commentArea}>
<TextInput
onChangeText={setComment}
value={comment}
multiline={true}
/>
</View>
<View style={styles.button}>
<ModalButton
buttonText={'Send'}
onPress={() => {
console.log(comment, 'send that commet to gmail')
}}
/>
</View>
</View>
)
}
export default StoreReview
【问题讨论】:
标签: javascript react-native email