## 前言 我们先来看下面这段代码: 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 (