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

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.

主站蜘蛛池模板: 监利县| 陆丰市| 县级市| 海口市| 原平市| 枣庄市| 英德市| 萨嘎县| 青河县| 岫岩| 辽阳县| 如皋市| 嘉祥县| 柘城县| 阳城县| 灵寿县| 长武县| 乐至县| 松滋市| 科技| 荔浦县| 会同县| 周宁县| 仙居县| 金阳县| 徐水县| 平安县| 郑州市| 盐山县| 凉山| 株洲县| 漾濞| 田林县| 宾川县| 宁安市| 平乐县| 龙里县| 通河县| 双桥区| 云安县| 基隆市|