【问题标题】:how can get and list entered value in TextInput on react-native?如何在 react-native 的 TextInput 中获取和列出输入的值?
【发布时间】:2020-05-12 20:16:47
【问题描述】:

我想在同一屏幕 react-native 上保存并列出在 TextInput 中输入的值。我怎么能不知道。我想要一个示例代码作为图像 enter image description here

【问题讨论】:

    标签: react-native user-controls textinput


    【解决方案1】:
    1. 使用平面列表和数组状态。
    2. 关于 TextInput 更新状态数组的更改
    3. 添加额外提示={this. state} 在 flatlist 中,每当状态更改时都会更新 flatlist。 请参阅 react native doc 中的 Flatlist。很简单

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-03-28
      • 1970-01-01
      • 2021-08-19
      • 1970-01-01
      • 2021-12-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多