- 
                Notifications
    You must be signed in to change notification settings 
- Fork 29
Closed
Labels
Description
Dont use index for the key for an item in a list. Unexpected updates can happen - especially when the list length changes or things are re-ordered (e.g. splitting).
Better: Create a unique id (e.g. uuid) for each listitem (e.g. chapter) and use that for the key.
/Users/angrave/2023/classtranscribe-fall2023/FrontEnd/src/screens/EPub/views/EditEPubChapter/ChapterEditor/ChapterContent.js
  106:64  warning  Do not use Array index in keys  react/no-array-index-key
/Users/angrave/2023/classtranscribe-fall2023/FrontEnd/src/screens/EPub/views/EditEPubChapter/ChapterEditor/ChapterInfo.js
  65:16  warning  Do not use Array index in keys  react/no-array-index-key
/Users/angrave/2023/classtranscribe-fall2023/FrontEnd/src/screens/EPub/views/EditEPubChapter/ChapterEditor/SubChapterItem.js
  71:16  warning  Do not use Array index in keys  react/no-array-index-key
/Users/angrave/2023/classtranscribe-fall2023/FrontEnd/src/screens/EPub/views/EditEPubStructure/ChapterList/EPubListItem.js
/Users/angrave/2023/classtranscribe-fall2023/FrontEnd/src/screens/EPub/views/EditINote/INoteEditor/INoteChapter.js
  249:30  warning  Do not use Array index in keys  react/no-array-index-key