hello,i have problem with ListingEditScreen
check the render method of “ListingEditScreen”
photo :
My ListingEditScreen code
import { StyleSheet } from “react-native”;
import * as Yup from “yup”;
import React from “react”;
import {
AppForm,
AppFormField,
AppFormPicker,
SubmitButton,
} from “…/components/forms/index”;
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(props) {
return (
<AppForm
initialValues={{
title: “”,
price: “”,
description: “”,
category: null,
}}
onSubmit={(values) => console.log(values)}
validationSchema={validationSchema}
>
);
}
const styles = StyleSheet.create({
})
export default ListingEditScreen;