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

[Bug]: Storysource addon fills the console with warnings #25795

Open
fzaninotto opened this issue Jan 29, 2024 · 2 comments
Open

[Bug]: Storysource addon fills the console with warnings #25795

fzaninotto opened this issue Jan 29, 2024 · 2 comments

Comments

@fzaninotto
Copy link

Describe the bug

  1. Go to https://react-admin-storybook.vercel.app/
  2. Open the console
  3. See the warning:

Warning: Encountered two children with the same key, code-segment0. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

This warning disappears as soon as the storysource addon is removed.

To Reproduce

  1. Clone https://github.com/marmelab/react-admin
  2. run yarn
  3. run yarn storybook

System

No response

Additional context

The problem seems to come from here:

parts.push(...start);
parts.push(storyPart);
lastRow = last;
});
const lastPart = createPart({ rows: rows.slice(lastRow), stylesheet, useInlineStyles });
parts.push(...lastPart);

The first and the last 'part' have the same key

@asso1985
Copy link

Most likely is this line right?

@hudochenkov
Copy link

This is also happening in Storybook 7.6.7. Even when “Show addons” is not enabled, but “Code” tab in addons panel was the last opened:

Screenshot 2024-02-27 at 17 51 09

Warnings appear also on Docs page with Docs addon.

To hide warnings we need to switch from Code tab in the addons panel and refresh the page.

@JReinhold JReinhold self-assigned this Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: No status
Development

No branches or pull requests

5 participants