1、在构造函数内使用bind绑定this import React, { Component } from "react"; class Click extends Component { constructor(props){ super(props) this.hanldeClick = this.hanldeClick.bind(this) } hanldeClick(){ console.log("构造函数内使用bind绑定this") } render() { return <button onCl…