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

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.

主站蜘蛛池模板: 鹤壁市| 类乌齐县| 齐河县| 梅州市| 安西县| 东港市| 巨野县| 凭祥市| 太康县| 新邵县| 绥宁县| 邵阳县| 雷州市| 满洲里市| 砚山县| 潜山县| 彰化县| 曲水县| 三门县| 株洲市| 盈江县| 历史| 永平县| 武夷山市| 南陵县| 浦北县| 剑阁县| 连平县| 诸暨市| 和平县| 清苑县| 抚远县| 平乐县| 雷波县| 汾阳市| 通州市| 榆树市| 丰顺县| 祁东县| 疏勒县| 天峻县|