私の反応ネイティブプロジェクトにイメージスライダーを作成しようとしていますが、なぜ私にこのエラーを送信し続けているのか分かりません:ReferenceError:Can not変数を見つける:私が次のコンストラクタを持っているときにpropsを呼び出してレンダリングする。変数を見つけることができません:props(react-native)
constructor(props){
super(props)
this.state = {
imagesSlider: [
require('../images/1.jpg'),
require('../images/2.jpg')
]
}
}
render() {
return (
<Swiper style={styles.slide} autoplay> {
this.state.imagesSlider.map(function(item,i){
<View key={i}>
<Image source={props.item}/>
</View>
})
}
</Swiper>
);
}
私を助けてくれますか? :) – Tekla