Hello,i have problem with render of ListingEditScreen,i can’t just see it
here is my ListingEditScreen code
import React from “react”;
import { StyleSheet } from “react-native”;
import * as Yup from “yup”;
import {
AppForm as Form,
AppFormField as FormField,
AppFormPicker as Picker,
SubmitButton,
} from “…/components/forms”;
import Screen from “…/components/Screen”;
const validationSchema = Yup.object().shape({
title: Yup.string().required().min(1).label(“Title”),
price: Yup.number().required().min(1).max(10000).label(“Price”),
description: Yup.string().label(“Description”),
category: Yup.object().required().nullable().label(“Category”),
});
const categories = [
{ label: “Furniture”, value: 1 },
{ label: “Clothing”, value: 2 },
{ label: “Camera”, value: 3 },
];
function ListingEditScreen() {
return (
<Form
initialValues={{
title: “”,
price: “”,
description: “”,
category: null,
}}
onSubmit={(values) => console.log(values)}
validationSchema={validationSchema}
>
);
}
const styles = StyleSheet.create({
container: {
padding: 10,
},
});
export default ListingEditScreen;
And here my App.js code
import { StatusBar } from “expo-status-bar”;
import React, { useState } from “react”;
import {
StyleSheet,
Text,
View,
SafeAreaView,
TextInput,
Switch,
Button
} from “react-native”;
import LoginScreen from ‘./app/components/LoginScreen’
import AppButton from “./app/components/AppButton”;
import WelcomeScreen from “./app/screens/WelcomeScreen”;
import Card from “./app/components/Card”;
import ListingDetailsScreen from “./app/screens/ListingDetailsScreen”;
import ViewImageScreen from “./app/screens/ViewImageScreen”;
import MessageScreen from “./app/screens/MessageScreen”;
import Screen from “./app/components/Screen”;
import Icon from “./app/components/Icon”;
import ListItem from “./app/components/Listitem”;
import AccountScreen from “./app/screens/AccountScreen”;
import ListingsScreen from “./app/screens/ListingsScreen”;
import AppTextInput from “./app/components/AppTextInput”;
import AppPicker from “./app/components/AppPicker”;
import ListingEditScreen from “./app/screens/ListingEditScreen”;
const categories = [
{ label: “Furniture”, value: 1 },
{ label: “Clothing”, value: 2 },
{ label: “Cameras”, value: 3 },
];
export default function App() {
const [category, setCategory] = useState();
return (
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: “center”,
alignItems: “center”,
},
});