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

204
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
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