30

箭头函数正在正在破坏我们的 React 组件…… - 知乎

 5 years ago
source link: https://zhuanlan.zhihu.com/p/56272434
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
原文作者:Karthik Kalyanaraman译者:Sangle译者的话:JS 类中的箭头函数只是语法糖,在编译之后,它将出现在构造函数中,在实例化时创建并分配,这就是为什么我们没有在原型中看到这些方法。在使用箭头函数(而…

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK