We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
讨论
taro3 class A { c(){ this //View node? }, render(){ return ( <View onClick={this.c}> ) } }
请问为什么这里的this是 View 看起来和react不一样
也许是this应该是A比较合理吗? 和react一致
The text was updated successfully, but these errors were encountered:
你需要bind(this)才会指向A。或者 onClick={() => this.c()}
Sorry, something went wrong.
解决这个问题非常简单 其实我想了解为什么这样设计 以及能不能判断内置组建的时候 把this改过去 毕竟react 在div的onclick this不会是 div
要指向 A 就需要 bind,不 bind 时指向什么不太重要吧。
为什么不bind的时候 指向view呢?
No branches or pull requests
这个特性解决了什么问题?
讨论
请问为什么这里的this是 View 看起来和react不一样
也许是this应该是A比较合理吗? 和react一致
The text was updated successfully, but these errors were encountered: