这是我第一次编码,我遇到了渲染错误。将不胜感激任何形式的反馈。
从“反应”导入反应; 从 'react-native' 导入 {Text, ImageBackground, View, StyleSheet};
const Card = props => {
const {name, image, bio} = props.user;
返回 (
<Text style={styles.name}>{name}</Text>
<Text style={styles.bio}>{bio}</Text>
</View>
</ImageBackground>
</View>
);
};
const styles = StyleSheet.create({
card: {
width: '95%',
height: '70%',
borderRadius: 10,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 6,
},
shadowOpacity: 0.37,
shadowRadius: 7.49,
elevation: 12,
},
image: {
width: '100%',
height: '100%',
borderRadius: 10,
overflow: 'hidden',
justifyContent: 'flex-end',
},
cardInner: {
padding: 10,
},
name: {
fontSize: 30,
color: 'white',
fontWeight:'bold'
},
bio: {
fontSize: 18,
color: 'white',
lineHeight: 25,
},
});
导出默认卡;
非常感谢任何帮助。我对此非常陌生,所以如果你能用更简单的术语向我解释,那就太好了<3