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

154
Views
React Context is not passing 1/2 fields

So I'm learning how to use React context, I have found this example which is very helpful: https://codesandbox.io/s/login-flow-w-react-context-api-p9j96?file=/src/Login/index.js

Since useSetState can no longer be used, I tried to import useState from react, but it doesn't work the same, useState only passing password to the login function, as can be seen here:

https://codesandbox.io/s/login-flow-w-react-context-api-forked-njs1kt?file=/src/Login/index.js

Console also threw this error:

A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.

Anyway I can fix this? Thank you guys so much, and happy holiday!!

about 4 years ago · Juan Pablo Isaza
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!