--- title: 05-React中绑定this并给函数传参的几种方式 publish: true --- ## 前言 我们先来看下面这段代码: components/MyComponent.jsx ```javascript import React from "react"; export default class MyComponent extends React.Component { constructor(props) { super(props); this.state = { msg: "这是 MyComponent 组件 默认的msg" }; } render() { return (