- 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.
推薦閱讀
- 解構產品經理:互聯網產品策劃入門寶典
- Beginning Java Data Structures and Algorithms
- DevOps for Networking
- 實用防銹油配方與制備200例
- 我的第一本算法書
- Apache Spark 2 for Beginners
- Getting Started with CreateJS
- 趣學Python算法100例
- Java軟件開發基礎
- OpenGL Data Visualization Cookbook
- App Inventor 2 Essentials
- Arduino Wearable Projects
- NGUI for Unity
- Java程序設計教程
- AI自動化測試:技術原理、平臺搭建與工程實踐