📜  哪一个是更好的箭头函数或在反应中使用绑定? - Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:14.429000             🧑  作者: Mango

代码示例2
import React from 'react';
import { boundMethod as bind } from 'autobind-decorator';
class MyComponent extends React.Component {
  constructor(props) {
    super(props)
  }

  @bind
  clickHandler() {
    console.log( this )
  }

  render() {
    return 
  }
}