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

[Addon Info] React warns unique "key" prop when using PropTypes.oneOfType #2649

Closed
lhnrd opened this issue Jan 4, 2018 · 2 comments
Closed
Assignees

Comments

@lhnrd
Copy link

lhnrd commented Jan 4, 2018

Issue details

The warning below appeared after I updated addon-info to 3.3.3. It happens when I use PropTypes.oneOfType, I think it got something to do with PropTables rendering.

warning.js:33 Warning: Each child in an array or iterator should have a unique "key" prop.

Check the render method of `OneOfType`. See https://fb.me/react-warning-keys for more information.
    in span (created by OneOfType)
    in OneOfType (created by PrettyPropType)
    in PrettyPropType (created by PropTable)
    in td (created by glamorous(td))
    in glamorous(td) (created by PropTable)
    in tr (created by PropTable)
    in tbody (created by PropTable)
    in table (created by glamorous(table))
    in glamorous(table) (created by PropTable)
    in PropTable
    in Unknown (created by Story)
    in div (created by Story)
    in div (created by Story)
    in div (created by Story)
    in div (created by Story)
    in div (created by Story)
    in Story
    in ThemeProvider

Steps to reproduce

  1. Create a component
  2. Add a story with withInfo
  3. Add PropTypes.oneOfType to component's propTypes

Please specify which version of Storybook and optionally any affected addons that you're running

  • @storybook/react 3.3.3
  • @storybook/addon-info 3.3.3
@lhnrd lhnrd changed the title React warns unique "key" prop when using PropTypes.oneOfType [Addon Info] React warns unique "key" prop when using PropTypes.oneOfType Jan 5, 2018
@Hypnosphi Hypnosphi self-assigned this Jan 13, 2018
@igor-dv
Copy link
Member

igor-dv commented Jan 14, 2018

Don't we use "merged" label until it's published? Or are there new policies? =)

@Hypnosphi
Copy link
Member

Sorry I forgot about github magic words

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