#reactjs #react-native
Вопрос:
Пожалуйста, объясните, что не так с этим кодом. Я продолжаю получать эту ошибку. Код был сгенерирован из Adobe XD.
import React from 'react';
import {
View,
Text,
Image
} from 'react-native';
const Register = () =>{
return (
<View style = {
{
"alignItems": "flex-start"
}
} >
<Image style = {
{
"marginStart": 22,
"width": 340,
"height": 281
}
}
source = {
require('../assets/images/store.png')
}
/>
<View style = {
{
"alignItems": "flex-start",
"paddingStart": 32,
"paddingTop": 138,
"marginTop": 2,
"width": 375,
"height": 406,
"borderTopStartRadius": 21,
"borderTopEndRadius": 28,
"borderBottomEndRadius": 0,
"borderBottomStartRadius": 0,
"backgroundColor": "rgba(6, 87, 118, 255)"
}
} >
<View style = {
{
"alignItems": "flex-start"
}
} >
<Text style = {
{
"fontFamily": "Montserrat",
"fontSize": 10,
"color": "rgba(255, 255, 255, 255)",
"marginStart": 9
}
} > Kindly enter your phone number to
continue </Text>
<View style = {
{
"flexDirection": "row",
"alignItems": "flex-start",
"marginTop": 23
}
} >
<Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(128, 9, 124, 255)",
"marginTop": 154,
"opacity": 0.72
}
} > 244 </Text>
<View style = {
{
"alignItems": "flex-start",
"paddingTop": 5,
"marginStart": -50,
"width": 306,
"height": 175,
"borderRadius": 8,
"backgroundColor": "rgba(255, 255, 255, 255)"
}
} >
<View style = {
{
flexDirection: 'row',
alignItems: 'flex-start'
}
} > <Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(252, 7, 7, 255)",
"marginStart": 2,
"marginTop": 4,
"opacity": 0.72
}
} > 1 </Text>
<Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(83, 83, 80, 255)",
"marginStart": 97,
"marginTop": 3,
"opacity": 0.72
}
} > 7066459456 </Text>
</View>
<View style = {
{
flexDirection: 'row',
alignItems: 'flex-start'
}
} > <Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(0, 17, 128, 255)",
"marginStart": 2,
"marginTop": 6,
"opacity": 0.72
}
} > 44 </Text>
<Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(83, 83, 80, 255)",
"marginStart": 85,
"marginTop": 5,
"opacity": 0.72
}
} > 7066459456 </Text>
</View>
<View style = {
{
flexDirection: 'row',
alignItems: 'flex-start'
}
} > <Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(3, 89, 99, 255)",
"marginStart": 1,
"marginTop": 6,
"opacity": 0.72
}
} > 61 </Text>
<Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(83, 83, 80, 255)",
"marginStart": 85,
"marginTop": 5,
"opacity": 0.72
}
} > 7066459456 </Text>
</View>
<View style = {
{
flexDirection: 'row',
alignItems: 'flex-start'
}
} > <Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(103, 126, 6, 255)",
"marginTop": 8,
"opacity": 0.72
}
} > 233 </Text>
<Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(83, 83, 80, 255)",
"marginStart": 72,
"marginTop": 7,
"opacity": 0.72
}
} > 7066459456 </Text>
</View>
<Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 22,
"color": "rgba(83, 83, 80, 255)",
"marginStart": 122,
"marginTop": 7,
"opacity": 0.72
}
} > 7066459456 </Text>
</View>
</View>
</View>
<View style = {
{
flexDirection: 'row',
alignItems: 'flex-start'
}
} > <View style = {
{
"alignItems": "flex-start",
"marginTop": -182,
"width": 62,
"height": 51,
"borderRadius": 7,
"backgroundColor": "rgba(255, 255, 255, 255)"
}
}
/>
<View style = {
{
"alignItems": "flex-start",
"marginStart": 20,
"marginTop": -182,
"width": 224,
"height": 51,
"borderRadius": 7,
"backgroundColor": "rgba(255, 255, 255, 255)"
}
}
/>
</View>
<View style = {
{
"alignItems": "flex-start",
"paddingStart": 20,
"paddingTop": 17,
"marginStart": 213,
"marginTop": 107,
"width": 102,
"height": 56,
"borderRadius": 28,
"backgroundColor": "rgba(255, 255, 255, 255)"
}
} >
<Text style = {
{
"fontFamily": "Montserrat",
"fontWeight": "bold",
"fontSize": 26,
"color": "rgba(6, 87, 118, 255)"
}
} > next </Text>
</View>
</View>
</View>
);
};
export default Register;
Комментарии:
1. Текст:
aaaaa
не находится внутриText
компонента, вот почему вы получаете эту ошибку.2. Я удалил это. Все еще получаю ошибку.
3. можете ли вы показать линию ошибки ?