Skip to content
New issue

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

[翻译]Arrow Functions in Class Properties Might Not Be As Great As We Think | 随笔 #12

Open
mrzzcn opened this issue Mar 20, 2019 · 0 comments

Comments

@mrzzcn
Copy link
Owner

mrzzcn commented Mar 20, 2019

https://mrzzcn.github.io/2018/11/17/arrow-function-in-class-property/

Javascript 新增了 arrow function 和 class,这两者的概念可参考:arrow function,类。React 里面的方法想要在JSX中使用,必须手动绑定 this,有些人会在这儿使用箭头函数简写掉 this.method = this.method.bind(this); 这行代码,本文作者对这种写法进行了分析,原文在此:Arrow Functions in Cl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant