官术网_书友最值得收藏!

Building forms

In this section, we will explore how we can handle text input from users. Traditional means of collecting input from so-called forms is divided into two major ways: controlled and uncontrolled. In a native environment, this means either handling any keypress on the React Native side (controlled input), or letting it be handled on the native system level and collecting data in React on demand (uncontrolled input). 

If you come from a web development background, please note that, at the time of writing this book, there is no form component, and I don't see it coming. There are also limitations to refs and what you can do with them. For instance, you cannot ask a ref to a TextInput for its current value. Please follow the following two subsections for more details. You can also use custom libraries, but I will not discuss such solutions here as these tend to change often.

主站蜘蛛池模板: 沂源县| 徐州市| 佳木斯市| 普兰县| 普安县| 潼南县| 青州市| 内丘县| 个旧市| 隆安县| 横山县| 马公市| 东安县| 滨州市| 修武县| 承德县| 廉江市| 斗六市| 新兴县| 西和县| 慈利县| 柞水县| 仙居县| 景泰县| 鄢陵县| 兰溪市| 白银市| 社会| 克山县| 治县。| 大理市| 崇左市| 永仁县| 枝江市| 巴东县| 连州市| 龙岩市| 吉安县| 呼玛县| 大悟县| 于都县|