私はそれがeroorにF:/ReactNativeProject/FirstProject/index.android.js: Unexpected token, expected ((23:8) at F:\ReactNativeProject\FirstProject\index.android.js:23:8 onResponse DevServerHelper.java:330 execute RealCall.java:126 run NamedRunnable.java:32 runWorker ThreadPoolExecutor.java:1112 run ThreadPoolExecutor.java:587 run Thread.java:818
一部を示してコンパイルするとき、私は、2 TextView
とImageView
を設定するために単純な参照を取ります1は私にEroor:F:/ReactNativeProject/FirstProject/index.android.js:予想予期しないトークン、((23:8)
import React, { Component,} from 'react';
import { AppRegistry, Image, StyleSheet, Text, View,} from 'react-native';
var MOKCKED_MOVIES_DATA=[
{title:'Title' , year:'2017' , posters:{thumbnail:'http://i.imgur.com/UePbdph.jpg'}},
];
class SampleAppMovies extends Component{
render(){
var movie=MOKCKED_MOVIES_DATA[0];
return(
<View style={styles.container}>
<Text>{movie.title}</Text>
<Text>{movie.year}</Text>
<Image source={{uri:movie.posters.thumbnail}}
style={styles.thumbnail}
/>
</View>
);
}
var styles=StyleSheet.create({
container:{
flex:1,
justifyContent:'center',
alignItems:'center',
backgroundColor:'#F5FCFF',
},
thumbnail:{
width:53,
height:81,
},
});
}
AppRegistry.registerComponent('FirstProject',() => SampleAppMovies);
?間違っているとエラーが反応ネイティブを使用しているとき、私はよくエラーを見つけるのですか、コード行が表示されない?
'index.android.js:23:8'でエラーを表示します –
正確に23:8とは何ですか?それは、23時のコード行を意味しますか? –
index.android.jsの23行目と8番目の文字 –