items.map(el => setItems(items.map(item => item === el ? item.show = !item.show : item)))
react-dom.development.js:327 Uncaught TypeError: Cannot create property 'show' on boolean 'true'
const handle = el => {
setItems(items => items.map(item => item === el
? {
...item,
show: !item.show
}
: item
));
};