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

361
Views
react-jsx-dev-runtime.development.js:97 Warning: Each child in a list should have a unique "key" prop
Check the render method of `Category`. See https://reactjs.org/link/warning-keys for more information.
    at FoodCard (http://localhost:3000/static/js/bundle.js:966:5)
    at Category (http://localhost:3000/static/js/bundle.js:2829:66)

My error might be generated from this snippet of code but I am not sure.

const Category = () =>{
    
    const {category} = useParams();
    const {categoriesMap} = useContext(CategoriesContext);
    const[products, setProducts] = useState([categoriesMap[category]]);

    useEffect(()=>{
        setProducts(categoriesMap[category]);
    }, [category, categoriesMap])

     return (
    <Fragment>
      <h2 className='category-title'>{category.toUpperCase()}</h2>
      <div className='category-container'>
        {products &&
          products
          .map((food) => (
            <FoodCard key={food.id} food={food} />
          ))}
      </div>
    </Fragment>
  );
};

export default Category;
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

your issue seems to come from key={food.id}

you should check out your food.id values. There is probably two identical value in your dataset

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!