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

203
Views
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 answers
Answer question

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