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

245
Views
Uncaught TypeError: Cannot read properties of undefined (reading 'filter'). I cannot find the where is error

this is my react code to filter the recommended movies:- filter error

What is wrong with the code? What changes should be done?

react-redux:v7.2.6

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

moviesData is expecting a type because .filter only works on arrays, type something like this:

type Movie = {
 is_premiere: boolean
}

const recommended movies = () => {
  const moviesData: Movie[] = useSelector((state) => state.moviesData);
 
// Rest of your code
}

Sorry for formatting, in typing from my phone

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!