Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

206
Views
¿Por qué el nombre de entrada no cambia su valor?

Estoy tratando de editar los datos del perfil del usuario, y cuando cambio el nombre en el campo de entrada, no cambiará, conserva el nombre que tiene el usuario.

 const [nameInput, setNameInput] = useState(''); const editUserData = () => { const userParams = { phone: phone, fullName: nameInput, gender: value, birthdate: date, }; axios .put('url', userParams) .then((response) => { console.log('response', response.data); }) .catch((error) => { console.log(error.message); }); }; <TextInput style={styles.nameInputStyle} onChangeText={(event) => setNameInput(event)} value={nameInput} keyboardType="email-address" returnKeyType="done" onEndEditing={(e) => handleValidName(e.nativeEvent.text)} autoCapitalize="sentences" />

¿Cómo puedo cambiar el nombre del valor en el campo de entrada?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Debe configurarlo en event.target.value , no event :

 <TextInput style={styles.nameInputStyle} onChangeText={(event) => setNameInput(event.target.value)} value={nameInput} keyboardType="email-address" returnKeyType="done" onEndEditing={(e) => handleValidName(e.nativeEvent.text)} autoCapitalize="sentences" />

EDITAR

event.target.value no funcionará. Usa esto en su lugar:

 <TextInput style={styles.nameInputStyle} onChangeText={setNameInput} value={nameInput} keyboardType="email-address" returnKeyType="done" onEndEditing={(e) => handleValidName(e.nativeEvent.text)} autoCapitalize="sentences" />
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!