react native get TextInput value

前端 未结 16 2029
一生所求
一生所求 2020-12-04 16:10

I am stuck with a very simple problem. I have login form with username, password and button. In my button handler, I try to get the textinput value. But always get undefined

16条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-04 16:50

    There is huge difference between onChange and onTextChange prop of . Don't be like me and use onTextChange which returns string and don't use onChange which returns full objects.

    I feel dumb for spending like 1 hour figuring out where is my value.

提交回复
热议问题