question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:17
  • Comments:16 (5 by maintainers)

github_iconTop GitHub Comments

6reactions
SQRedercommented, Jul 23, 2019

bump

4reactions
mtmacdonaldcommented, Aug 15, 2019

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: Each Child in a List Should Have a Unique 'key' Prop
When creating a list in the UI from an array with JSX, you should add a key prop to each child and to...
Read more >
Each child in a list should have a unique "key" prop in React.js ...
Whenever you render an array of components React will complain about needing the key attribute. In your case its probably the line return ......
Read more >
How to Fix 'Each child should have a unique key prop' - Webtips
Learn what is the root cause, and how to fix 'Warning: Each child in a list should have a unique 'key' prop.' warnings...
Read more >
Warning: Each child in a list should have a unique "key" prop
To prevent ugly errors in your console when you loop through an array, React likes you to use a unique key for each...
Read more >
Each child in a list should have a unique "key" prop in react js ...
How to solve Warning : Each child in a list should have a unique " key " prop in react js is shown....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found