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

"Each child should have a key prop" warning when using React 16 #359

Closed
MacRusher opened this issue Oct 26, 2017 · 1 comment
Closed

"Each child should have a key prop" warning when using React 16 #359

MacRusher opened this issue Oct 26, 2017 · 1 comment
Assignees
Labels
Type: Bug Bug reports and their fixes

Comments

@MacRusher
Copy link
Member

In React 16 using field components directly from package results in a warning.

Below stacktrace is for TextField from uniforms-semantic, but the same warning is thrown for other field components and themes.

Warning: Each child in an array or iterator should have a unique "key" prop. See https://fb.me/react-warning-keys for more information.
    in div
    in div (created by Text)
    in Text (created by TextField)
    in TextField (created by Register)
    in div (created by GridColumn)
    in GridColumn (created by Register)
    in div (created by GridRow)
    in GridRow (created by Register)
    in div (created by Grid)
    in Grid (created by Register)
    in form (created by AutoValidatedQuickSemanticForm)
    in AutoValidatedQuickSemanticForm

I'm using uniforms@1.21.0 and react@16.0.0

Warning is not thrown when the same field component is loaded directly from app (builded during app build and not by uniforms itself)

It has probably something to do with babel-plugin-transform-react-inline-elements used by uniforms.

Related thread: facebook/react#10352

@radekmie radekmie self-assigned this Oct 26, 2017
@radekmie radekmie added the Type: Bug Bug reports and their fixes label Oct 26, 2017
@radekmie
Copy link
Contributor

As discussed (and tested) internally: I'll simply remove this plugin.

@radekmie radekmie moved this to Closed in Open Source Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug reports and their fixes
Projects
Archived in project
Development

No branches or pull requests

2 participants