- Hands-On Design Patterns with React Native
- Mateusz Grzesiukiewicz
- 156字
- 2021-08-13 15:13:01
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.
推薦閱讀
- 手機安全和可信應用開發指南:TrustZone與OP-TEE技術詳解
- Python入門很簡單
- Cocos2d-x游戲開發:手把手教你Lua語言的編程方法
- Apache Spark 2.x Machine Learning Cookbook
- 程序員數學:用Python學透線性代數和微積分
- 深入淺出Android Jetpack
- Mastering Python High Performance
- 深度學習:算法入門與Keras編程實踐
- Hands-On Full Stack Development with Spring Boot 2.0 and React
- Learning Modular Java Programming
- Building Dynamics CRM 2015 Dashboards with Power BI
- Xamarin Blueprints
- 分布式架構原理與實踐
- Scrapy網絡爬蟲實戰
- OpenCV 3.0 Computer Vision with Java