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,
搞不明白為什么英文逗號不識別不了
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,
搞不明白為什么英文逗號不識別不了
2017-05-01
加載json這里有一個大坑,最新的是用
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書寫配置文件,啟動項(xiàng)目用npm start,具體的命令全部被寫在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無效,可以執(zhí)行npm run serve,然后會運(yùn)行出項(xiàng)目網(wǎng)址,復(fù)制粘貼下來在網(wǎng)站上查看即可
2017-04-08
getInitialState(){ return { isEditing: false } }報(bào)錯的額解決方法是
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)錯的原因是es6創(chuàng)建extends React.Component 時
要去掉:function 也就是-->rearrange ( centerIndex ) {}
要去掉:function 也就是-->rearrange ( centerIndex ) {}
2017-04-04
平時自己寫代碼會寫注釋,一般函數(shù)外部表明函數(shù)做的事情和邏輯也會在函數(shù)內(nèi)部關(guān)鍵地方注釋。 但是css還很少會寫注釋。感覺這門課不止學(xué)了react 還學(xué)了代碼規(guī)范 老師好樣的
2017-03-30