search

Home  >  Q&A  >  body text

android - React Native中的this,怎么理解?

黄舟黄舟2780 days ago623

reply all(2)I'll reply

  • 迷茫

    迷茫2017-04-18 09:24:00

    So strange, why do you write it like this? I feel like you can just use this.updateNum(); and this.updatePW(); to get it done, right?

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-18 09:24:00

    The person above is right. There is a problem with your writing method. There is no need for bind in the constructor. RN generally needs bind when calling methods in a class in render, which means changing the scope so that its methods act on the current operation object

    reply
    0
  • Cancelreply