-4
林没有在附近完成,但是当我尝试NPM启动这个项目,我得到的错误:为什么我得到这个javascript错误?
Unexpected token, expected ;
2 |
3 |
> 4 | const App = fucntion() {
| ^
5 | return <div>HI!</div>;
6 | }
7 |
,这是index.js完整的文件:
import React from 'react';
const App = fucntion() {
return <div>HI!</div>;
}
//shove into dom (page)
React.render(App);