Skip to content

flattenChildren warning in JS console when adding second comment #369

@reconstructions

Description

@reconstructions

When adding a second comment (without reloading) using the new ActionCable enabled version of react-webpack-rails-tutorial, I get the following error (twice) in my browser console. The comment is added and appears correctly in the view, but apparently the keys aren't unique, probably the count isn't incremented properly now that ActionCable has replaced REST. Here's the error trace:

Warning: flattenChildren(...): Encountered two children with the same key, `67`. Child keys must be unique; when two children share a key, only the first child will be used.
    in ReactTransitionGroup (created by ReactCSSTransitionGroup)
    in ReactCSSTransitionGroup (created by CommentList)
    in div (created by CommentList)
    in CommentList (created by CommentBox)
    in div (created by CommentBox)
    in CommentBox (created by InjectIntl(CommentBox))
    in InjectIntl(CommentBox) (created by CommentScreen)
    in div (created by CommentScreen)
    in div (created by CommentScreen)
    in CommentScreen (created by RouterCommentsContainer)
    in IntlProvider (created by RouterCommentsContainer)
    in RouterCommentsContainer (created by Connect(RouterCommentsContainer))
    in Connect(RouterCommentsContainer) (created by RouterContext)
    in section (created by Layout)
    in Layout (created by RouterContext)
    in RouterContext (created by Router)
    in Router
    in Provider

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions