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

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.

主站蜘蛛池模板: 辽阳市| 金昌市| 沙洋县| 临邑县| 柯坪县| 房产| 聂拉木县| 苍南县| 垫江县| 萨嘎县| 德钦县| 苍南县| 耿马| 囊谦县| 高唐县| 扶绥县| 微山县| 遵化市| 邓州市| 苍溪县| 启东市| 团风县| 罗田县| 龙里县| 菏泽市| 广宗县| 宜昌市| 资溪县| 休宁县| 望都县| 长子县| 金门县| 东辽县| 巴林右旗| 公主岭市| 武胜县| 临武县| 邵东县| 盈江县| 三河市| 布拖县|