首页 > 解决方案 > 使用 const { icon, ...other } = this.props 时出现语法错误;

问题描述

我正在使用最新的反应并开始了一个新项目我的代码是这样的

 export default class MaterialIcon extends Component {
   render() {
     const {  icon, ...other } = this.props;

     return (
      <MaterialIconDefault
        icon={icon}
        {...other}
      />
}
}

谁能说出了什么问题

标签: reactjsreact-router

解决方案


推荐阅读