Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

97
Visualizações
Populating Firestore database data into a table modular version 9

I am trying to read Database Data into a Table but I am getting an empty table from my Output though I am convinced I am doing the right thing. Below is My code in the useEffect Hook and how I am Calling the data in the Table data jsx element.

Intervening for your Help

My Use useEffect Code

useEffect(() => {

    const readCustomersData= async() =>{
        const data = await getDocs(customersCollectionRef);
        setCustomers(data.docs.map((doc) => ({ ...doc.data(), id:doc.id})));

    }

    readCustomersData();
},[])

How I am Calling The code in The jsx Elememnt

             { customers.map(( value, index) => { 
                  return( 

                <tr key={index.id}>
                   
                    <th scope="row">{index+1}</th>
                    <td>{value.cname}</td>
                    <td>{value.contact}</td>
                    <td>{}</td>
                    <th>{}</th>
                    <td>{}</td>
                    <td>{}</td>
                    <td>{}</td>
                    <td>{}</td>

                    <td className='p-2 d-flex justify-content-space-between'>
                        <Button variant='success'>Update</Button> <Button variant='danger'>Delete</Button>
                       
                    </td>
                </tr>


                  )
              })}

                   
                    
                   
            </tbody>
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda