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

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.

主站蜘蛛池模板: 饶河县| 西林县| 南雄市| 杨浦区| 灯塔市| 若羌县| 县级市| 宾川县| 公安县| 航空| 三台县| 奉贤区| 富顺县| 福建省| 焉耆| 陆丰市| 朔州市| 黄石市| 特克斯县| 利川市| 蓬莱市| 错那县| 邢台市| 柳河县| 九龙坡区| 城步| 清流县| 赣榆县| 上蔡县| 赤壁市| 舒兰市| 哈巴河县| 若羌县| 宜昌市| 横峰县| 休宁县| 鹿泉市| 呼和浩特市| 湛江市| 灌云县| 且末县|