小编Abh*_*hek的帖子

如何将输入字段数据从Modal传递到react-Native中的Container?

这是我正在使用的:

<Modal
    visible = {this.props.visible}
    animationType="slide"
    transparent
    onRequestClose={() => {}} >
         <TextInput 
           style = {styles.inputBox}
           ref = {this.props.destinatinon} />
   </Modal>
Run Code Online (Sandbox Code Playgroud)

在容器中

 <ExampleModal
       destination = {this.state.destination} >
     </ExampleModal>
Run Code Online (Sandbox Code Playgroud)

我不知道如何将数据从Modal传递给Parent Component.任何类型的教程或链接都可以.提前致谢.

javascript reactjs react-native

5
推荐指数
1
解决办法
3960
查看次数

标签 统计

javascript ×1

react-native ×1

reactjs ×1