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

136
Views
I'm building netflix clone using reactjs.It is shownig the page for 1 sec and it turns blank again
 [import React, { useEffect, useState } from 'react';
 import './Row.css';
 import axios from './axios'

 function Row({ title,fetchUrl, isLargeRow = false}) {
    const [movies, setMovies] = useState([]);

    const base_url = "https://image.tmdb.org/t/p/original/"

    useEffect(() => {
        async function fetchData() {
            const request = await axios.get(fetchUrl);
            setMovies(request.data.results);
            return request;
        }

        fetchData();
}, [fetchUrl[]][1]);

// console.log(movies);

  return (
    <div className='row'>
        <h2>{title}</h2>

        {movies.map((movie) => (
             <img src={`${base_url}${
                isLargeRow ? movie.poster_path : movie.backdrop_path
            }`} alt={movie.name}
            />
            ))}
     </div>
  );
}

export default Row

I am getting an error

Warning: Each child in a list should have a unique "key" prop.

Check the render method of Row. See https://reactjs.org/link/warning-keys for more information. at img at Row (http://localhost:3000/static/js/bundle.js:596:5) at div at HomeScreen at div at App at Provider (http://localhost:3000/static/js/bundle.js:43095:5)

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

0

In dependency of useEffect just give fetchUrl like
like this
}, [fetchUrl]);

about 4 years ago · Aman Chauhan 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!