Docusaurus: Warning: Each child in an array or iterator should have a unique "key" prop. when using Code Tabs

Created on 3 Mar 2019  路  5Comments  路  Source: facebook/docusaurus

馃悰 Bug Report

Getting a warning: Each child in an array or iterator should have a unique "key" prop. when opening a page that uses Language-specific Code Tabs, version 1.7.2.

To Reproduce

Note: In the example below I added some spaces between ` to avoid breaking the style. In the markdown file I am using there are no such spaces.

<!--DOCUSAURUS_CODE_TABS-->
<!--JavaScript-->
` ` `js
// some js code
}
` ` `
<!--Python-->
` ` `python
# some python code
` ` `
<!--END_DOCUSAURUS_CODE_TABS-->

Run docusaurus-start and visit the page.

Expected behavior

No warnings are printed in the console.

Actual Behavior

The following warnings are logged:

$ docusaurus-start
LiveReload server started on port 35729
Docusaurus server started on port 3000
Warning: Each child in an array or iterator should have a unique "key" prop.

Check the top-level render call using <article>. See https://fb.me/react-warning-keys for more information.
    in MarkdownBlock
    in Doc
    in div
    in div
    in Container
    in div
    in div
    in body
    in html
    in Site
    in DocsLayout
Warning: Each child in an array or iterator should have a unique "key" prop.

Check the top-level render call using <div>. See https://fb.me/react-warning-keys for more information.
    in div
    in MarkdownBlock
    in article
    in div
    in Doc
    in div
    in div
    in Container
    in div
    in div
    in body
    in html
    in Site
    in DocsLayout

Reproducible Demo

Problem can be seen in the docs/webhooks/examples.html and docs/webhooks/start.html pages.

bug starter

All 5 comments

cc @fiennyangeln

This should be quite an easy fix. Anyone is free to take it up 馃槃

@yangshun I'd like to scoop this one up!

@oneuptim it's yours!

I've added an "issue: claimed" label so that others will know not to start work on the issue. If you change your mind about the issue, no worries! Just let me know so that I can remove the label and free it up for someone else to claim.

I'll check in with you periodically so that we can keep the task updated with the progress.

Sounds good! Thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

maximousblk picture maximousblk  路  23Comments

KoenCa picture KoenCa  路  25Comments

bhaskarhc picture bhaskarhc  路  23Comments

yangshun picture yangshun  路  61Comments

slorber picture slorber  路  23Comments