const sampleData = [
{id: 1, name: 'Sabine', cuisine: 'Italian', location: 'New York', rating: 4.5, _uid: 'abc123'},
{id: 2, name: 'The Matador', cuisine: 'Mexican', location: 'Los Angeles', rating: 4.0, _uid: 'abc12334'},
{id: 3, name: 'Nagoya Steakhouse', cuisine: 'Japanese', location: 'San Francisco', rating: 4.2, _uid: 'abc1234'},
]
The key for
<TableRow>and it’s associated children is generated based off of theidof the passed in data. It would be helpful to be able to customize the key that is used foridsinceidmay not always exist in the data. For instance, I have a private_uidfield that I’d prefer to generate the key off of. In my case, the user has access to update theidfield so this may results in duplicate keys if they choose the sameid.Example data: