react-webpack-rails-tutorial
react-webpack-rails-tutorial copied to clipboard
flattenChildren warning in JS console when adding second comment
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
@reconstructions Any chance that you want to try to submit a PR to address this?
@justin808 I will see if I can try and track it down in the next couple days, thx.
It seems this issue is resolved.