首页 > 解决方案 > how can get and list entered value in TextInput on react-native?

问题描述

ı want to save and list values that entered in TextInput on same screen react-native.How can ı make dont know. ı want an example code as image enter image description here

标签: react-nativeuser-controlstextinput

解决方案


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

推荐阅读