import React, { useState } from "react"; import { Box, Heading, VStack, FormControl, Button, Center, ScrollView } from "native-base"; import { View, TextInput, StyleSheet } from "react-native"; export default function Profile({route, navigation}){ const baseURL = 'http://localhost:4000/user/updateUser' const userData = JSON.parse(JSON.stringify(route.params)); const [name, setName] = useState(); const [apellido, setApellido] =useState(); const [email, setEmail] = useState(); const [password, setPassword] = useState(); console.log(userData.user); const updateInfo = async() => { try { await fetch(baseURL, { cache: 'no-cache', method: 'PUT', body: JSON.stringify(userData), headers: { 'Content-Type': 'application/json' } }) .then(response => { if (response.status != 201){ console.log('ocurrio un error '); }else{ return response.json(); } }) } catch (error) { console.log("ERROR: " + error); } } return (