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

208
Visualizações
i try to import a array data in JS file from another js file in react native , and i try to check the length of the array in react native

enter image description here

TypeError: undefined is not an object (evaluating '_kurals.default.length') i got this error. enter image description here

export const kurals =[];
import kurals from './kurals';
 console.log(`data1.length`, kurals.length);
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you want to import it as a default, like you did with import kurals from './kurals';, then it must be exported as default:

export default [];

Since you exported it with export const kurals = []; then it's a property of the exported object and you need to destructure it:

import { kurals } from './kurals';
about 4 years ago · Juan Pablo Isaza Relatório
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