I have a state object called items.
items: [
{
name: 'John'
id: '1',
checked: false,
},
{
name: 'Dude'
id: '2',
checked: true,
}
]
On UI Click i need to update checked property to true of item with id = 1 How do i use the setState for the items for updating one(single) item in the items