Home > OS >  Warning: Each child in a list should have a unique "key" prop. Check the render method of
Warning: Each child in a list should have a unique "key" prop. Check the render method of

Time:06-28

here is my repo:- https://github.com/Punit9349/i-notebook/tree/main/src

error in components folder , notes.js. my notes are not shown on my app, only a empty note is shown but shown in my console, also after adding new notes, once they added also added to database but will dissappear after refreshing. enter image description here

CodePudding user response:

Problem is because _id attribute on note is not unique. You hardcoded _id for note when you add new, which will throw you that warning. Key must be unique.

CodePudding user response:

I think your github I-notebook project is not updated I checked it use my repo to debug = Inotebook

try to give different key to note

  • Related