React Native | Controlled Field Array: Undefined Value #7335
-
Hello, I am trying to create a dynamic TextInput where the user can append({name: ''") or add a pet name field for the user to fill out. I am unable to retrieve or read the user's input, the value console.log's as undefined. The result should be petname [{name: 'Dog1'}, {name: 'Dog2'] |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
use Controller for react native controlled components: https://react-hook-form.com/api/usecontroller/controller |
Beta Was this translation helpful? Give feedback.
-
Here's a snack with an example on how to use RN |
Beta Was this translation helpful? Give feedback.
-
Hi @Moshyfawn is your snack working on Android and iOS devices? as I am not able to get it to work with almost a similar codebase. Also your snack is not working on Android and iOS devices, I am not able to update the input values. I am able to update the input values when running in web mode. |
Beta Was this translation helpful? Give feedback.
Here's a snack with an example on how to use RN
<TextInput />
with RHF