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

165
Views
TypeError: no se pueden leer las propiedades de undefined (leyendo 'mapa'). Aparece un error cuando intento mapear una matriz de criptomonedas

Estoy creando una página que muestra todas las criptomonedas en el formato de una tarjeta, pero recibo un error.

 import { Card, Row, Col, Input } from 'antd' import React from 'react' import { Link } from 'react-router-dom' import { useGetCryptosQuery } from '../services/CryptoApi' import { useState } from 'react' import millify from 'millify' const Cryptocurrencies = () => { const {data : cryptoList, isFetching } = useGetCryptosQuery() const [cryptos,setCryptos] = useState(cryptoList?.data?.coins) console.log(cryptos) return ( <div> <Row gutter = {[32,32]} className = "crypto-card-container"> {cryptos.map((currency) => ( <Col xs = {24} sm = {12} lg = {6} className = "crypto-card" key = {currency.id}> <Link to = {'/crypto/${currency.id}'}> <Card title = {'${currency.rank}. ${currency.name}'} extra = {<img className = "crypto-img" src = {currency.iconUrl}/>} hoverable > <p>Price : {millify(currency.price)}</p> <p>Market Cap : {millify(currency.marketCap)}</p> <p>Daily Change : {millify(currency.change)}</p> </Card> </Link> </Col> ))} </Row> </div> ) } export default Cryptocurrencies

¿Cuál es el error en mi función de mapa y la devolución de llamada que he usado?

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

0

podrías usar

 {!isFetching && cryptos.map((currency) => ( ... ))}

o

 {!isFetching ? <LoadingOrPlaceHolder> : cryptos.map((currency) => ( ... ))}

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!