Skip to content

react/no-array-index-key - Breaking this.props.children in to chunks and using index as a key #1123

Closed
@penx

Description

@penx

Are there circumstances when it is ok to use array index as a key? If so, could these exceptions be added to the documentation here:

https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-array-index-key.md

I have run in to an issue where I am breaking down this.props.children in to several chunks in order to render them in a grid - but I can't see how I could use anything other than the array index as an identifier - more information here:

http://stackoverflow.com/questions/42983067/breaking-children-in-to-chunks-and-react-no-array-index-key

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy