Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

123
Vistas
Im getting a TypeError: Cannot read properties of undefined (reading 'map')

The data i queried on firestore

I'm trying to get a data from Figure1 mainly the age. And i tried to loop my map but ended up getting an error.

Unhandled Rejection (TypeError): Cannot read properties of undefined (reading 'map') The error message

export default function TargetClientList() {
const [targetClient, setTargetClient] = useState([]);

useEffect(() => {
    const usersCollectionRef = collection(db, "client");
    const getClientList = async () => {
        const data = await getDocs(usersCollectionRef);
        setTargetClient(data.docs.map((doc) => ({ ...doc.data(), id: doc.id })));
    };
    getClientList();
}, []);

return (
    <Layout>
      <Center py={6}>
            <Table variant="striped" >
                <Tbody>
                    {targetClient.map((works) => {
                        return (
                            <Tr key={works.id}>
                                <Td>{works.first} {works.middle} {works.last}</Td>
                                <Td>
                                    <Stack direction="row" spacing={1}>
                                        <TempModal  works= {works}/>
                                    </Stack>
                                </Td>
                                <Td>
                                    {works.Figure1.map((home) => {
                                        <h1>{home.age}</h1></h1>
                                    })}
                                </Td>
                                <Td>
                                    <Stack direction="row" spacing={1}>
                                        <WorkModal  works= {works}/>
                                    </Stack>
                                </Td>
                            </Tr>
                        );
                    })}
                </Tbody>
            </Table>
        </Center>
    </Layout>
)

}

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda