Skip to content

Update Forwarding Refs documentation to include use of keys #1340

Description

@jackson-sandland

It's common practice in React to add keys to elements that are being iterated.
After looking carefully at the docs for forwardRef, and running into an issue with a key not being set, it appears that forwardRef returns an iterator, and requires a unique key is set on each element.
It would be great to have the docs for forwardRef reflect this requirement, and note anything unique e.g. common patterns to use when iterating to produce childComponents, which utilize forwardRef.

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