Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flattenChildren warning in JS console when adding second comment #369

Closed
reconstructions opened this issue Mar 29, 2017 · 3 comments
Closed

Comments

@reconstructions
Copy link
Contributor

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
@justin808
Copy link
Member

@reconstructions Any chance that you want to try to submit a PR to address this?

@reconstructions
Copy link
Contributor Author

@justin808 I will see if I can try and track it down in the next couple days, thx.

@ahangarha
Copy link
Contributor

It seems this issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants