📜  TYPESCript 道具类组件 - TypeScript 代码示例

📅  最后修改于: 2022-03-11 14:48:24.688000             🧑  作者: Mango

代码示例2
interface IProps {
}

interface IState {
  playOrPause?: string;
}

class Player extends React.Component {
  // ------------------------------------------^
  constructor(props: IProps) {
    super(props);

    this.state = {
      playOrPause: 'Play'
    };
  }

  render() {
    return(
      
); } }