react native get TextInput value

前端 未结 16 2027
一生所求
一生所求 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:48

    This work for me

        
    this.userName = text} /> this.Password = text} />

    and

      _signInAsync = async () => {
            console.log(this.userName)
            console.log(this.Password) 
      };
    

提交回复
热议问题