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

83
Views
La autenticación de reacción no se actualiza correctamente

cuando tengo mis funciones en UserAuthContext.js, mi aplicación no funciona correctamente. Intento iniciar sesión, pero el usuario no está dirigido a/navegar como debería. Pero si pongo el mismo código en app.js puedo crear e iniciar sesión con una cuenta. No sé cuál es el motivo aquí, el código https://codesandbox.io/s/cool-euler-eicfr?file=/src/App.js -no funciona la versión (el código anterior pertenece a esto): https ://not-working.netlify.app/ -versión funcional donde tengo el código en app.js https://netflix-clone-kasamtde.netlify.app/

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

0

No puede usar useAuthContext en un componente que no sea un elemento secundario de UserAuthContextProvider . Siempre volverá undefined

La solución más fácil para esto es mover UserAuthContextProvider a index.js :

 // index.js import React from 'react'; import {render} from 'react-dom'; import './index.css'; import App from './App'; import UserAuthContextProvider from "./components/Contexts/UserAuthContext.js"; render( <React.StrictMode> <UserAuthContextProvider><App /></UserAuthContextProvider> </React.StrictMode>, document.getElementById('root') );
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!