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

156
Views
No se puede establecer el estado de uso predeterminado para los datos redux entrantes

Necesito establecer el estado con el valor predeterminado de un reductor redux. Puedo consolar. registrar el valor bien, ¿supongo que no es lo suficientemente "rápido"?

Intenté establecer una variable en el valor del reductor que necesito y luego llamé a useState con la variable, pero tampoco funcionó...

 const ChatProvider = ({ children }) => { const conversations = useSelector((state) => state.conversations) // all conversations const [activeConversationId, setActiveConversationId] = useState(conversations[1]?.conversationSid) console.log(conversations[1]?.conversationSid) // I get my string "Ox990" console.log(activeConversationId) // I get undefined... // render stuff here }
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!