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

141
Views
Reactjs: TypeError: no se pueden leer las propiedades de undefined (leyendo 'url')

Obtengo una lectura indefinida de URL y otro producto. {elementos} cuando vuelvo a cargar el navegador para ejecutar este código.

 const location = useLocation(); const id = location.pathname.split('/')[2]; const [product, setProduct] = useState([]); useEffect(() => { const fetchProduct = async ()=>{ try{ const res = await commerce.products.retrieve(id); setProduct(res); }catch{} }; fetchProduct(); },[id]); return ( <Container> <Wrapper> <ImgContainer> <Image src={product.image.url}/> </ImgContainer> <InfoContainer> <Title>{product.name}</Title> </InfoContainer> </Wrapper> </Container> ) }
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!