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 in a list should have a unique "key" prop #32

Closed
pkuczynski opened this issue Mar 13, 2019 · 5 comments
Closed

Each child in a list should have a unique "key" prop #32

pkuczynski opened this issue Mar 13, 2019 · 5 comments

Comments

@pkuczynski
Copy link
Contributor

I am seeing following warning after adding this plugin:

Warning: Each child in a list should have a unique "key" prop.

Check the top-level render call using <Styled(div)>. See https://fb.me/react-warning-keys for more information.
    in LocalePanel
    in Unknown
    in Unknown
    in Unknown
    in Unknown (created by Context.Consumer)
    in _default (created by Layout)
    in div (created by Context.Consumer)
    in Styled(div) (created by Panel)
    in Panel (created by Layout)
    in div (created by Context.Consumer)
    in Styled(div) (created by Main)
    in div (created by Context.Consumer)
    in Styled(div) (created by Main)
    in Main (created by Layout)
    in Layout (created by Context.Consumer)
    in WithTheme(Layout) (created by ResizeDetector)
    in ResizeDetector
    in div (created by Context.Consumer)
    in Styled(div)
    in Unknown
    in Unknown (created by ResizeDetector)
    in ResizeDetector
    in Unknown
    in Unknown (created by Manager)
    in ThemeProvider (created by Manager)
    in Manager (created by Context.Consumer)
    in Location (created by QueryLocation)
    in QueryLocation (created by Root)
    in LocationProvider (created by Root)
    in HelmetProvider (created by Root)
    in Root

Seems that LocalePanel is part of this library?

@floriangosse
Copy link
Member

Which version of React and Storybook do you use?
And which other add-ons have you registered?

@pkuczynski
Copy link
Contributor Author

    "@storybook/addon-actions": "^5.0.1",
    "@storybook/addon-options": "^5.0.1",
    "@storybook/addons": "^5.0.1",
    "@storybook/react": "^5.0.1",
    "storybook-addon-intl": "^2.4.0",
    "react": "^16.8.4",
    "react-dev-utils": "^8.0.0",
    "react-dom": "^16.8.4",
    "react-intl": "^2.7.2",

@floriangosse
Copy link
Member

I might have something to do with storybook@5. I'll need more time to investigate and fix it.

I keep you updated.

@vdh
Copy link
Contributor

vdh commented Mar 29, 2019

It looks like they changed the addon panel rendering in Storybook v5. It was changed in commit storybookjs/storybook@5ecc23e

I couldn't find documentation about the change, but it seemed straightforward enough so I tested a small local patch that looks like it fixed it. I made a PR with the same change.

@floriangosse
Copy link
Member

A new version was published which contains the fix for this problem.

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

No branches or pull requests

3 participants