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

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.

主站蜘蛛池模板: 静宁县| 辰溪县| 普洱| 卓资县| 桦甸市| 长武县| 江阴市| 会昌县| 马山县| 泉州市| 英吉沙县| 贵州省| 颍上县| 临沧市| 安达市| 亚东县| 金山区| 涪陵区| 天祝| 鲁山县| 拉孜县| 都匀市| 屏东市| 祁门县| 佛山市| 麦盖提县| 无极县| 云浮市| 武山县| 长汀县| 大渡口区| 柞水县| 锦州市| 大田县| 佳木斯市| 江都市| 乌什县| 旅游| 刚察县| 山西省| 三原县|