Storybook: [addon-notes] console warning (Each child in a list should have a unique "key" prop)

Created on 7 Jun 2019  路  16Comments  路  Source: storybookjs/storybook

Describe the bug
When using the Notes Addon, there's a React console warning:

vendors~main.608b7bf874843e30ef63.bundle.js:88356 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 NotesPanel
    in Unknown
    in Unknown
    in Unknown
    in Unknown (created by Context.Consumer)
    in ManagerConsumer (created by _default)
    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)
    in Unknown
    in Unknown (created by ResizeDetector)
    in ChildWrapper (created by ResizeDetector)
    in ResizeDetector
    in div (created by Context.Consumer)
    in Styled(div)
    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

To Reproduce
Steps to reproduce the behavior:

  1. Install and enable the Notes Addon following the default readme instructions
  2. Run Storybook
  3. Open the console
  4. See error

Expected behavior
No console warning.

System:

  • OS: [MacOS]
  • Device: [Macbook Pro 2018]
  • Browser: [Chrome]
  • Framework: [React]
  • Addons: [Notes]
  • Version: [e.g. 5.1.3]
notes bug

Most helpful comment

bump

All 16 comments

I have same issue if addon-notes is installed

I am seeing the same error in Vue, but only in the development server; the error does not present itself in the production build.

Hi, any update on this issue?

bump

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Issue is still unresolved for me. I think it's important for release quality that console warnings are fixed, because this tool is used for component testing, and if the tool itself is giving warnings it doesn't look great.

@mtmacdonald PRs welcome!

bump

Also take a look at Storybook Docs, which is intended to replace addon-info and addon-notes, doesn't have this problem, and is being more actively maintained: https://medium.com/storybookjs/storybook-docspage-e185bc3622bf

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

You can pass key prop to NotesPanel, like here

https://github.com/CPedrini/storybook-addon-specifications/commit/6c1a6c0caef836c15c0669c4e918054d04264fd0#diff-9e023b4b5b28995504b8e79efd9e3989R20

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

Ta-da!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.34 containing PR #8633 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

Closing this issue. Please re-open if you think there's still more to do.

Yowza!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.2.6 containing PR #8633 that references this issue. Upgrade today to try it out!

updated to 5.3.9, I still got this issue

addon-notes is being superceded by addon-docs, which fixes a bunch of bugs and is easier to maintain. Please give it a try! https://medium.com/storybookjs/storybook-docspage-e185bc3622bf

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sakulstra picture sakulstra  路  3Comments

wahengchang picture wahengchang  路  3Comments

zvictor picture zvictor  路  3Comments

tomitrescak picture tomitrescak  路  3Comments

Jonovono picture Jonovono  路  3Comments