reactjs - 使用 const { icon, ...other } = this.props 时出现语法错误;
问题描述
我正在使用最新的反应并开始了一个新项目我的代码是这样的
export default class MaterialIcon extends Component {
render() {
const { icon, ...other } = this.props;
return (
<MaterialIconDefault
icon={icon}
{...other}
/>
}
}
谁能说出了什么问题
解决方案
推荐阅读
- c - 如何设置for循环的限制以工作直到行尾/直到达到特定字符串
- sql - SQL select查询按DESC返回错误的顺序
- php - 如何通过 Paypal Express Checkout 一起进行多次定期付款
- android - 升级到 Android Studio 3.4 - Aapt2InternalException: AAPT2: Daemon startup failed
- javascript - 如何使范围滑块触摸屏友好?
- rust - Rust 特征可以部分实现吗?
- git - 如何跟踪拉取请求在 GitHub 上打开的时间?
- nginx - Nginx 负载均衡器配置
- node.js - 在 Firebase 函数和 React 之间共享代码
- .htaccess - 图像路径的 URL 重写 - Multistore - .htaccess