【发布时间】:2018-11-22 17:35:50
【问题描述】:
命令:
react-native init Test && react-native run-android
App.js:
export default class App extends Component {
render() {
new Function("person", "const { firstname } = person; alert(firstname);")({ firstname: "Test" });
}
}
每当新函数被构造和调用时,应用程序就会崩溃,说明:"SyntaxError: Unexpected token '{'. Expected an identifier name in const declaration" 仅在 Android 上发生。
任何帮助将不胜感激。谢谢!
React Native:v0.55.7
【问题讨论】:
标签: android react-native ecmascript-6