Я наткнулся на web3-react, но он не работает с новыми версиями React.
bar[123].str_two[true]();
Это называется извращением.
const items = document.querySelectorAll(`#Moscow_all_districts > [id]:not([id^="path"])`);
items.forEach(el => el.style.filter = 'grayscale(1)');
document.addEventListener('click', (e) => {
const id = e.target.id;
const allItems = document.querySelectorAll(`#Moscow_all_districts > #${id}:not([id^="path"])`);
allItems.forEach(el => el.style.filter = 'grayscale(0)');
allItems.forEach(el => el.style.fill = '#2859FF');
});
И давно сторедж у нас объекты возвращает?