与 ES5 相比,React 的 ES6 语法有何不同?
Compared to ES5, what are the differences in React ES6 syntax?
题目类型: 技术面试题
这是一道技术面试题,常见于澳洲IT公司面试中。
难度: medium
分类: JavaScript in React
标签: ES5, ES6, import, export, class, props, state
参考答案摘要
核心答案 以下语法是 ES5 与 ES6 中的区别: 1. require 与 import // ES5 var React = require('react'); // ES6 import React from 'react'; 2. module.exports 与 export default // ES5 module.exports = Component; // ES6 expor...
本题提供 STAR 原则详细解答和技术解析,登录匠人学院学习中心即可查看完整答案。