mernCommentBox icon indicating copy to clipboard operation
mernCommentBox copied to clipboard

Warning displayed when posting comments

Open opudrovs opened this issue 7 years ago • 1 comments

Hi Bryan,

I am still getting this warning (which was fixed for loading comments before) when posting a comment:

warning.js:35 Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `CommentList`. See https://fb.me/react-warning-keys for more information.
    in Comment (created by CommentList)
    in CommentList (created by CommentBox)
    in div (created by CommentBox)
    in CommentBox

The warning occurs in both code created when following your tutorial to the point before updating and deleting comments and this repo's code unchanged (except for the DB URL, login and password).

Maybe there is a conflict between id and _id somewhere between the comment just submitted and comments loaded? I think I managed to fix the warning by switching to using either id or _id somewhere, but I don't think it's the right way.

opudrovs avatar Jul 30 '17 15:07 opudrovs

Should be fixed with PR

tygas avatar Oct 30 '17 15:10 tygas