Skip to content

Key prop for DOM nodes is actually called 'code' #3669

Closed
@rainbow-alex

Description

@rainbow-alex

I was trying to fix this warning:

Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of Text. See http://fb.me/react-warning-keys for more information.

After some searching I ended up in react.js, where I found (in ReactElement.createElement):

key = config.code === undefined ? null : '' + config.code;

I finally managed to get rid of the warning by using React.createElement("li", {code: ...}) instead of React.createElement("li", {key: ...}).

This should be fixed, probably in .createElement, or at least in the docs/warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions