I am using index to generate key in a list. However, es-lint generates an error for the same. React doc also states that using the item index as a key should be used as last
use the following lib "react-uuid" : https://www.npmjs.com/package/react-uuid.
react-uuid basically create random ids when you call it each time.
import React from 'react'
import uuid from 'react-uuid'
const array = ['one', 'two', 'three']
export const LineItem = item => - {item}
export const List = () => array.map(item => )
and this should solve the issue.