client?eb57:75 ./src/components/Main.js
Module build failed: SyntaxError: G:/react/gallery-by-react/src/components/Main.js: Unexpected token (67:3)
65 | </section>
66 | );
> 67 | },
| ^
68 | Constant:{
69 | centerPos:{
70 | left:0,
搞不明白為什么英文逗號(hào)不識(shí)別不了
Module build failed: SyntaxError: G:/react/gallery-by-react/src/components/Main.js: Unexpected token (67:3)
65 | </section>
66 | );
> 67 | },
| ^
68 | Constant:{
69 | centerPos:{
70 | left:0,
搞不明白為什么英文逗號(hào)不識(shí)別不了
2017-05-01
加載json這里有一個(gè)大坑,最新的是用
rules: [
{
test: /\.json$/,
use: 'json-loader'
}
]
而不是
{
test: /\.json$/,
loader: 'json-loader'
}
rules: [
{
test: /\.json$/,
use: 'json-loader'
}
]
而不是
{
test: /\.json$/,
loader: 'json-loader'
}
2017-04-27
項(xiàng)目完整地址:https://github.com/zhangxintong/gallery-by-react
Demo:https://zhangxintong.github.io/gallery-by-react/
如有幫助幫忙點(diǎn)贊,謝謝
Demo:https://zhangxintong.github.io/gallery-by-react/
如有幫助幫忙點(diǎn)贊,謝謝
2017-04-17
版本更新,現(xiàn)在使用es6書(shū)寫(xiě)配置文件,啟動(dòng)項(xiàng)目用npm start,具體的命令全部被寫(xiě)在package.json中。
而webpack的基本設(shè)置都在cfg文件夾中,課程中的配置項(xiàng)主要在base.js和defaults.js中,希望可以幫到大家
而webpack的基本設(shè)置都在cfg文件夾中,課程中的配置項(xiàng)主要在base.js和defaults.js中,希望可以幫到大家
2017-04-08
現(xiàn)在新版執(zhí)行g(shù)runt serve無(wú)效,可以執(zhí)行npm run serve,然后會(huì)運(yùn)行出項(xiàng)目網(wǎng)址,復(fù)制粘貼下來(lái)在網(wǎng)站上查看即可
2017-04-08
getInitialState(){ return { isEditing: false } }報(bào)錯(cuò)的額解決方法是
constructor(props){
super(props);
this.state = { // define this.state in constructor
isEditing: false
}
}
constructor(props){
super(props);
this.state = { // define this.state in constructor
isEditing: false
}
}
2017-04-04
rearrange:function(centerIndex ) {} 報(bào)錯(cuò)的原因是es6創(chuàng)建extends React.Component 時(shí)
要去掉:function 也就是-->rearrange ( centerIndex ) {}
要去掉:function 也就是-->rearrange ( centerIndex ) {}
2017-04-04
平時(shí)自己寫(xiě)代碼會(huì)寫(xiě)注釋?zhuān)话愫瘮?shù)外部表明函數(shù)做的事情和邏輯也會(huì)在函數(shù)內(nèi)部關(guān)鍵地方注釋。 但是css還很少會(huì)寫(xiě)注釋。感覺(jué)這門(mén)課不止學(xué)了react 還學(xué)了代碼規(guī)范 老師好樣的
2017-03-30