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

139
Views
¿Como usar useEffect
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

useEffect es un hook de React que se utiliza para manejar los estados dentro de un componente.

Ejemplo:

const [name, setName] = useState('');

Esto declararía un variable llamada name que dependiendo al ciclo de vida del componente puede tener múltiples estados.

si queremos hacer un input que reciba datos del usuario podría ser de la siguiente manera:

const myComponent = () => {
   const [userName, setUsername] = useState(null)
   const [password, setPassword] = useState(null)

   return (
        <>
           <input type="text" placeholder="Enter userName..."   onChange={e => setUsername(e.target.value)} value={userName || ''}/>
           <input type="password" placeholder="Enter Password..."    onChange={e => setPassword(e.target.value)} value={password || ''}/>
        </>
    )
}

over 4 years ago · Santiago Trujillo 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!