Skip to content

Warning displayed when posting comments #10

@opudrovs

Description

@opudrovs

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions