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

293
Views
Obteniendo "Error de tipo no capturado (en promesa): no se pueden leer las propiedades de undefined (leyendo 'datos')"

Captura de pantalla de error, mientras consola en google. Ese es el código que di, y obtengo un error inesperado

 const [email, setEmail] = useState(""); const [password, setPassword] = useState(""); const [error, setError] = useState(false); const [loading, setLoading] = useState(false); // useEffect(() => { // const userInfo = localStorage.getItem("userInfo"); // if(userInfo){ // history.push("/mynotes"); // } // }, [history]); const submitHandler = async (e) => { e.preventDefault(); console.log(email, password); try{ const config = { headers: { "Content-type": "application/json", }, }; setLoading(true); const { data } = await axios.post( "/api/users/login", { email, password }, config ); console.log(data); localStorage.setItem("userInfo", JSON.stringify(data)); setLoading(false); } catch (error){ setError(error.response.data.message); // setLoading(false); }
[1]: https://i.stack.imgur.com/UVse7.jpg
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!